1AIO_CANCEL(3P) POSIX Programmer's Manual AIO_CANCEL(3P)
2
3
4
6 This manual page is part of the POSIX Programmer's Manual. The Linux
7 implementation of this interface may differ (consult the corresponding
8 Linux manual page for details of Linux behavior), or the interface may
9 not be implemented on Linux.
10
12 aio_cancel - cancel an asynchronous I/O request (REALTIME)
13
15 #include <aio.h>
16
17 int aio_cancel(int fildes, struct aiocb *aiocbp);
18
19
21 The aio_cancel() function shall attempt to cancel one or more asynchro‐
22 nous I/O requests currently outstanding against file descriptor fildes.
23 The aiocbp argument points to the asynchronous I/O control block for a
24 particular request to be canceled. If aiocbp is NULL, then all out‐
25 standing cancelable asynchronous I/O requests against fildes shall be
26 canceled.
27
28 Normal asynchronous notification shall occur for asynchronous I/O oper‐
29 ations that are successfully canceled. If there are requests that can‐
30 not be canceled, then the normal asynchronous completion process shall
31 take place for those requests when they are completed.
32
33 For requested operations that are successfully canceled, the associated
34 error status shall be set to [ECANCELED] and the return status shall be
35 -1. For requested operations that are not successfully canceled, the
36 aiocbp shall not be modified by aio_cancel().
37
38 If aiocbp is not NULL, then if fildes does not have the same value as
39 the file descriptor with which the asynchronous operation was initi‐
40 ated, unspecified results occur.
41
42 Which operations are cancelable is implementation-defined.
43
45 The aio_cancel() function shall return the value AIO_CANCELED to the
46 calling process if the requested operation(s) were canceled. The value
47 AIO_NOTCANCELED shall be returned if at least one of the requested
48 operation(s) cannot be canceled because it is in progress. In this
49 case, the state of the other operations, if any, referenced in the call
50 to aio_cancel() is not indicated by the return value of aio_cancel().
51 The application may determine the state of affairs for these operations
52 by using aio_error(). The value AIO_ALLDONE is returned if all of the
53 operations have already completed. Otherwise, the function shall return
54 -1 and set errno to indicate the error.
55
57 The aio_cancel() function shall fail if:
58
59 EBADF The fildes argument is not a valid file descriptor.
60
61
62 The following sections are informative.
63
65 None.
66
68 The aio_cancel() function is part of the Asynchronous Input and Output
69 option and need not be available on all implementations.
70
72 None.
73
75 None.
76
78 aio_read(), aio_write(), the Base Definitions volume of
79 IEEE Std 1003.1-2001, <aio.h>
80
82 Portions of this text are reprinted and reproduced in electronic form
83 from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
84 -- Portable Operating System Interface (POSIX), The Open Group Base
85 Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
86 Electrical and Electronics Engineers, Inc and The Open Group. In the
87 event of any discrepancy between this version and the original IEEE and
88 The Open Group Standard, the original IEEE and The Open Group Standard
89 is the referee document. The original Standard can be obtained online
90 at http://www.opengroup.org/unix/online.html .
91
92
93
94IEEE/The Open Group 2003 AIO_CANCEL(3P)