1aio_cancel(3C) Standard C Library Functions aio_cancel(3C)
2
3
4
6 aio_cancel - cancel asynchronous I/O request
7
9 #include <aio.h>
10
11 int aio_cancel(int fildes, struct aiocb *aiocbp);
12
13
15 The aio_cancel() function attempts to cancel one or more asynchronous
16 I/O requests currently outstanding against file descriptor fildes. The
17 aiocbp argument points to the asynchronous I/O control block for a par‐
18 ticular request to be canceled. If aiocbp is NULL, then all outstanding
19 cancelable asynchronous I/O requests against fildes are canceled.
20
21
22 Normal asynchronous notification occurs for asynchronous I/O operations
23 that are successfully canceled. If there are requests that cannot be
24 canceled, then the normal asynchronous completion process takes place
25 for those requests when they are completed.
26
27
28 For requested operations that are successfully canceled, the associated
29 error status is set to ECANCELED and the return status is −1. For
30 requested operations that are not successfully canceled, the aiocbp is
31 not modified by aio_cancel().
32
33
34 If aiocbp is not NULL, then if fildes does not have the same value as
35 the file descriptor with which the asynchronous operation was initi‐
36 ated, unspecified results occur.
37
39 The aio_cancel() function returns the value AIO_CANCELED to the calling
40 process if the requested operation(s) were canceled. The value AIO_NOT‐
41 CANCELED is returned if at least one of the requested operation(s) can‐
42 not be canceled because it is in progress. In this case, the state of
43 the other operations, if any, referenced in the call to aio_cancel() is
44 not indicated by the return value of aio_cancel(). The application may
45 determine the state of affairs for these operations by using
46 aio_error(3C). The value AIO_ALLDONE is returned if all of the opera‐
47 tions have already completed. Otherwise, the function returns −1 and
48 sets errno to indicate the error.
49
51 The aio_cancel() function will fail if:
52
53 EBADF The fildes argument is not a valid file descriptor.
54
55
56 ENOSYS The aio_cancel() function is not supported.
57
58
60 The aio_cancel() function has a transitional interface for 64-bit file
61 offsets. See lf64(5).
62
64 See attributes(5) for descriptions of the following attributes:
65
66
67
68
69 ┌─────────────────────────────┬─────────────────────────────┐
70 │ ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
71 ├─────────────────────────────┼─────────────────────────────┤
72 │Interface Stability │Committed │
73 ├─────────────────────────────┼─────────────────────────────┤
74 │MT-Level │MT-Safe │
75 ├─────────────────────────────┼─────────────────────────────┤
76 │Standard │See standards(5). │
77 └─────────────────────────────┴─────────────────────────────┘
78
80 aio.h(3HEAD), signal.h(3HEAD), aio_read(3C), aio_return(3C),
81 attributes(5), lf64(5), standards(5)
82
84 Solaris 2.6 was the first release to support the Asynchronous Input and
85 Output option. Prior to this release, this function always returned −1
86 and set errno to ENOSYS.
87
88
89
90SunOS 5.11 5 Feb 2008 aio_cancel(3C)