]> git.ipfire.org Git - thirdparty/man-pages.git/blob - man3/aio_cancel.3
Many pages: Use correct letter case in page titles (TH)
[thirdparty/man-pages.git] / man3 / aio_cancel.3
1 .\" Copyright (c) 2003 Andries Brouwer (aeb@cwi.nl)
2 .\"
3 .\" SPDX-License-Identifier: GPL-2.0-or-later
4 .\"
5 .TH aio_cancel 3 (date) "Linux man-pages (unreleased)"
6 .SH NAME
7 aio_cancel \- cancel an outstanding asynchronous I/O request
8 .SH LIBRARY
9 Real-time library
10 .RI ( librt ", " \-lrt )
11 .SH SYNOPSIS
12 .nf
13 .B "#include <aio.h>"
14 .PP
15 .BI "int aio_cancel(int " fd ", struct aiocb *" aiocbp );
16 .fi
17 .SH DESCRIPTION
18 The
19 .BR aio_cancel ()
20 function attempts to cancel outstanding asynchronous I/O requests
21 for the file descriptor
22 .IR fd .
23 If
24 .I aiocbp
25 is NULL, all such requests are canceled.
26 Otherwise, only the request
27 described by the control block pointed to by
28 .I aiocbp
29 is canceled.
30 (See
31 .BR aio (7)
32 for a description of the
33 .I aiocb
34 structure.)
35 .PP
36 Normal asynchronous notification occurs for canceled requests (see
37 .BR aio (7)
38 and
39 .BR sigevent (7)).
40 The request return status
41 .RB ( aio_return (3))
42 is set to \-1, and the request error status
43 .RB ( aio_error (3))
44 is set to
45 .BR ECANCELED .
46 The control block of requests that cannot be canceled is not changed.
47 .PP
48 If the request could not be canceled,
49 then it will terminate in the usual way after performing the I/O operation.
50 (In this case,
51 .BR aio_error (3)
52 will return the status
53 .BR EINPROGRESSS .)
54 .PP
55 If
56 .I aiocbp
57 is not NULL, and
58 .I fd
59 differs from the file descriptor with which the asynchronous operation
60 was initiated, unspecified results occur.
61 .PP
62 Which operations are cancelable is implementation-defined.
63 .\" FreeBSD: not those on raw disk devices.
64 .SH RETURN VALUE
65 The
66 .BR aio_cancel ()
67 function returns one of the following values:
68 .TP
69 .B AIO_CANCELED
70 All requests were successfully canceled.
71 .TP
72 .B AIO_NOTCANCELED
73 At least one of the
74 requests specified was not canceled because it was in progress.
75 In this case, one may check the status of individual requests using
76 .BR aio_error (3).
77 .TP
78 .B AIO_ALLDONE
79 All requests had already been completed before the call.
80 .TP
81 \-1
82 An error occurred.
83 The cause of the error can be found by inspecting
84 .IR errno .
85 .SH ERRORS
86 .TP
87 .B EBADF
88 .I fd
89 is not a valid file descriptor.
90 .TP
91 .B ENOSYS
92 .BR aio_cancel ()
93 is not implemented.
94 .SH VERSIONS
95 The
96 .BR aio_cancel ()
97 function is available since glibc 2.1.
98 .SH ATTRIBUTES
99 For an explanation of the terms used in this section, see
100 .BR attributes (7).
101 .ad l
102 .nh
103 .TS
104 allbox;
105 lbx lb lb
106 l l l.
107 Interface Attribute Value
108 T{
109 .BR aio_cancel ()
110 T} Thread safety MT-Safe
111 .TE
112 .hy
113 .ad
114 .sp 1
115 .SH STANDARDS
116 POSIX.1-2001, POSIX.1-2008.
117 .SH EXAMPLES
118 See
119 .BR aio (7).
120 .SH SEE ALSO
121 .BR aio_error (3),
122 .BR aio_fsync (3),
123 .BR aio_read (3),
124 .BR aio_return (3),
125 .BR aio_suspend (3),
126 .BR aio_write (3),
127 .BR lio_listio (3),
128 .BR aio (7)