home *** CD-ROM | disk | FTP | other *** search
/ MACD 4 / MACD4.iso / Emulatory / AROS / exec / checkio.c < prev    next >
Encoding:
C/C++ Source or Header  |  1978-03-06  |  1.6 KB  |  79 lines

  1. /*
  2.     (C) 1995-96 AROS - The Amiga Replacement OS
  3.     $Id: checkio.c,v 1.5 1996/10/24 15:50:45 aros Exp $
  4.     $Log: checkio.c,v $
  5.     Revision 1.5  1996/10/24 15:50:45  aros
  6.     Use the official AROS macros over the __AROS versions.
  7.  
  8.     Revision 1.4  1996/08/13 13:55:59  digulla
  9.     Replaced AROS_LA by AROS_LHA
  10.     Replaced some AROS_LH*I by AROS_LH*
  11.     Sorted and added includes
  12.  
  13.     Revision 1.3  1996/08/01 17:41:07  digulla
  14.     Added standard header for all files
  15.  
  16.     Desc:
  17.     Lang: english
  18. */
  19. #include <exec/execbase.h>
  20. #include <exec/io.h>
  21. #include <aros/libcall.h>
  22.  
  23. /*****************************************************************************
  24.  
  25.     NAME */
  26.     #include <clib/exec_protos.h>
  27.  
  28.     AROS_LH1I(struct IORequest *, CheckIO,
  29.  
  30. /*  SYNOPSIS */
  31.     AROS_LHA(struct IORequest *, iORequest, A1),
  32.  
  33. /*  LOCATION */
  34.     struct ExecBase *, SysBase, 78, Exec)
  35.  
  36. /*  FUNCTION
  37.     Check if an I/O request is completed.
  38.  
  39.     INPUTS
  40.     iORequest - Pointer to iorequest structure.
  41.  
  42.     RESULT
  43.     Pointer to the iorequest structure or NULL if the device is still
  44.     at work.
  45.  
  46.     NOTES
  47.  
  48.     EXAMPLE
  49.  
  50.     BUGS
  51.  
  52.     SEE ALSO
  53.     OpenDevice(), CloseDevice(), DoIO(), SendIO(), AbortIO(), WaitIO()
  54.  
  55.     INTERNALS
  56.  
  57.     HISTORY
  58.  
  59. ******************************************************************************/
  60. {
  61.     AROS_LIBFUNC_INIT
  62.  
  63.     /*
  64.     The I/O request is still in use if it wasn't done quick
  65.     and isn't yet replied (ln_Type==NT_MESSAGE).
  66.     */
  67.     if(!(iORequest->io_Flags&IOF_QUICK)&&
  68.        iORequest->io_Message.mn_Node.ln_Type==NT_MESSAGE)
  69.  
  70.     /* Still in use */
  71.     return NULL;
  72.     else
  73.     /* done */
  74.     return iORequest;
  75.  
  76.     AROS_LIBFUNC_EXIT
  77. } /* CheckIO */
  78.  
  79.