2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
5 Desc: Start an IO request and wait until it completes.
8 #include <exec/execbase.h>
10 #include <aros/libcall.h>
11 #include <proto/exec.h>
13 /*****************************************************************************
20 AROS_LHA(struct IORequest
*, iORequest
, A1
),
23 struct ExecBase
*, SysBase
, 76, Exec
)
26 Start an I/O request by calling the devices's BeginIO() vector.
27 It waits until the request is complete.
30 iORequest - Pointer to iorequest structure.
41 OpenDevice(), CloseDevice(), DoIO(), SendIO(), AbortIO(), WaitIO()
45 ******************************************************************************/
50 Prepare the message. Tell the device that it is OK to wait in the
51 BeginIO() call by setting the quick bit.
53 iORequest
->io_Flags
=IOF_QUICK
;
54 iORequest
->io_Message
.mn_Node
.ln_Type
=0;
56 /* Call BeginIO() vector */
58 AROS_LCA(struct IORequest
*,iORequest
,A1
),
59 struct Device
*,iORequest
->io_Device
,5,
62 /* It the quick flag is cleared it wasn't done quick. Wait for completion. */
63 if(!(iORequest
->io_Flags
&IOF_QUICK
))
66 /* All done. Get returncode. */
67 return iORequest
->io_Error
;