home *** CD-ROM | disk | FTP | other *** search
/ Amiga Tools 5 / Amiga Tools 5.iso / tools / developer-tools / aros / source / exec / devices / src / checkio.c < prev    next >
Encoding:
C/C++ Source or Header  |  1996-07-16  |  1.2 KB  |  68 lines

  1. /*
  2.     (C) 1995, 96 AROS - The Amiga Replacement OS
  3.     $Id$
  4.     $Log$
  5.     Desc:
  6.     Lang: english
  7. */
  8. #include "exec_intern.h"
  9. #include <exec/io.h>
  10. #include <aros/libcall.h>
  11.  
  12. /*****************************************************************************
  13.  
  14.     NAME */
  15.     #include <clib/exec_protos.h>
  16.  
  17.     __AROS_LH1I(struct IORequest *, CheckIO,
  18.  
  19. /*  SYNOPSIS */
  20.     __AROS_LA(struct IORequest *, iORequest, A1),
  21.  
  22. /*  LOCATION */
  23.     struct ExecBase *, SysBase, 78, Exec)
  24.  
  25. /*  FUNCTION
  26.     Check if an I/O request is completed.
  27.  
  28.     INPUTS
  29.     iORequest - Pointer to iorequest structure.
  30.  
  31.     RESULT
  32.     Pointer to the iorequest structure or NULL if the device is still
  33.     at work.
  34.  
  35.     NOTES
  36.  
  37.     EXAMPLE
  38.  
  39.     BUGS
  40.  
  41.     SEE ALSO
  42.     OpenDevice(), CloseDevice(), DoIO(), SendIO(), AbortIO(), WaitIO()
  43.  
  44.     INTERNALS
  45.  
  46.     HISTORY
  47.  
  48. ******************************************************************************/
  49. {
  50.     __AROS_FUNC_INIT
  51.  
  52.     /*
  53.     The I/O request is still in use if it wasn't done quick
  54.     and isn't yet replied (ln_Type==NT_MESSAGE).
  55.     */
  56.     if(!(iORequest->io_Flags&IOF_QUICK)&&
  57.        iORequest->io_Message.mn_Node.ln_Type==NT_MESSAGE)
  58.  
  59.     /* Still in use */
  60.     return NULL;
  61.     else
  62.     /* done */
  63.     return iORequest;
  64.  
  65.     __AROS_FUNC_EXIT
  66. } /* CheckIO */
  67.  
  68.