Detab
[AROS.git] / rom / exec / checkio.c
blob58886c9b560d50174d185338b889d7426023318d
1 /*
2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc: Check if an I/O request is completed.
6 Lang: english
7 */
8 #include <exec/execbase.h>
9 #include <exec/io.h>
10 #include <aros/libcall.h>
11 #include <proto/exec.h>
13 /*****************************************************************************
15 NAME */
17 AROS_LH1I(struct IORequest *, CheckIO,
19 /* SYNOPSIS */
20 AROS_LHA(struct IORequest *, iORequest, A1),
22 /* LOCATION */
23 struct ExecBase *, SysBase, 78, Exec)
25 /* FUNCTION
26 Check if an I/O request is completed.
28 INPUTS
29 iORequest - Pointer to iorequest structure.
31 RESULT
32 Pointer to the iorequest structure or NULL if the device is still
33 at work.
35 NOTES
37 EXAMPLE
39 BUGS
41 SEE ALSO
42 OpenDevice(), CloseDevice(), DoIO(), SendIO(), AbortIO(), WaitIO()
44 INTERNALS
46 ******************************************************************************/
48 AROS_LIBFUNC_INIT
51 The I/O request is still in use if it wasn't done quick
52 and isn't yet replied (ln_Type==NT_MESSAGE).
54 if(!(iORequest->io_Flags&IOF_QUICK)&&
55 iORequest->io_Message.mn_Node.ln_Type==NT_MESSAGE)
57 /* Still in use */
58 return NULL;
59 else
60 /* done */
61 return iORequest;
63 AROS_LIBFUNC_EXIT
64 } /* CheckIO */