grub2: bring back build of aros-side grub2 tools
[AROS.git] / rom / exec / abortio.c
blob3d85f783a92adaeccc79e4b1307e28a246f07dea
1 /*
2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc: Abort an I/O request.
6 Lang: english
7 */
8 #include <aros/debug.h>
9 #include <exec/execbase.h>
10 #include <exec/io.h>
11 #include <aros/libcall.h>
12 #include <proto/exec.h>
14 /*****************************************************************************
16 NAME */
18 AROS_LH1(LONG, AbortIO,
20 /* SYNOPSIS */
21 AROS_LHA(struct IORequest *, iORequest, A1),
23 /* LOCATION */
24 struct ExecBase *, SysBase, 80, Exec)
26 /* FUNCTION
27 Calls the AbortIO vector of the appropriate device to stop an
28 asynchronously started io request before completion. This may
29 or may not be done. You still have to do a WaitIO() on the
30 iorequest structure.
32 INPUTS
33 iORequest - Pointer to iorequest structure.
35 RESULT
36 Errorcode if the abort request failed, 0 if the abort request went
37 well. io_Error will then be set to IOERR_ABORTED.
39 NOTES
41 EXAMPLE
43 BUGS
45 SEE ALSO
46 OpenDevice(), CloseDevice(), DoIO(), SendIO(), WaitIO()
48 INTERNALS
50 ******************************************************************************/
52 AROS_LIBFUNC_INIT
53 ASSERT_VALID_PTR(iORequest);
54 ASSERT_VALID_PTR(iORequest->io_Device);
56 return AROS_LVO_CALL1(ULONG,
57 AROS_LCA(struct IORequest *,iORequest,A1),
58 struct Device *,iORequest->io_Device,6,
61 AROS_LIBFUNC_EXIT
62 } /* AbortIO */