Support rastport clipping rectangle for layerless rastports
[tangerine.git] / rom / exec / doio.c
blob5cee9ec768d2f21a4b94767f70dfcf7980d317d1
1 /*
2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc: Start an IO request and wait until it completes.
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_LH1(BYTE, DoIO,
19 /* SYNOPSIS */
20 AROS_LHA(struct IORequest *, iORequest, A1),
22 /* LOCATION */
23 struct ExecBase *, SysBase, 76, Exec)
25 /* FUNCTION
26 Start an I/O request by calling the devices's BeginIO() vector.
27 It waits until the request is complete.
29 INPUTS
30 iORequest - Pointer to iorequest structure.
32 RESULT
34 NOTES
36 EXAMPLE
38 BUGS
40 SEE ALSO
41 OpenDevice(), CloseDevice(), DoIO(), SendIO(), AbortIO(), WaitIO()
43 INTERNALS
45 ******************************************************************************/
47 AROS_LIBFUNC_INIT
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 */
57 AROS_LVO_CALL1NR(
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))
64 WaitIO(iORequest);
66 /* All done. Get returncode. */
67 return iORequest->io_Error;
68 AROS_LIBFUNC_EXIT
69 } /* DoIO */