]> git.ipfire.org Git - thirdparty/man-pages.git/blob - man3/aio_cancel.3
ffix
[thirdparty/man-pages.git] / man3 / aio_cancel.3
1 .\" Copyright (c) 2003 Andries Brouwer (aeb@cwi.nl)
2 .\"
3 .\" This is free documentation; you can redistribute it and/or
4 .\" modify it under the terms of the GNU General Public License as
5 .\" published by the Free Software Foundation; either version 2 of
6 .\" the License, or (at your option) any later version.
7 .\"
8 .\" The GNU General Public License's references to "object code"
9 .\" and "executables" are to be interpreted as the output of any
10 .\" document formatting or typesetting system, including
11 .\" intermediate and printed output.
12 .\"
13 .\" This manual is distributed in the hope that it will be useful,
14 .\" but WITHOUT ANY WARRANTY; without even the implied warranty of
15 .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 .\" GNU General Public License for more details.
17 .\"
18 .\" You should have received a copy of the GNU General Public
19 .\" License along with this manual; if not, write to the Free
20 .\" Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111,
21 .\" USA.
22 .\"
23 .TH AIO_CANCEL 3 2003-11-14 "" "Linux Programmer's Manual"
24 .SH NAME
25 aio_cancel \- cancel an outstanding asynchronous I/O request
26 .SH SYNOPSIS
27 .sp
28 .B "#include <aio.h>"
29 .sp
30 .BI "int aio_cancel(int " fd ", struct aiocb *" aiocbp );
31 .SH DESCRIPTION
32 The
33 .BR aio_cancel ()
34 function attempts to cancel outstanding asynchronous I/O requests
35 for the file descriptor
36 .IR fd .
37 If
38 .I aiocbp
39 is NULL, all such requests are canceled.
40 Otherwise, only the request
41 described by the control block pointed to by
42 .I aiocbp
43 is canceled.
44 .LP
45 Normal asynchronous notification occurs for canceled requests.
46 The request return status is set to \-1, and the request error status
47 is set to ECANCELED.
48 The control block of requests that cannot be canceled is not changed.
49 .LP
50 If
51 .I aiocbp
52 is not NULL, and
53 .I fd
54 differs from the file descriptor with which the asynchronous operation
55 was initiated, unspecified results occur.
56 .LP
57 Which operations are cancellable is implementation-defined.
58 .\" FreeBSD: not those on raw disk devices.
59 .SH "RETURN VALUE"
60 This function returns AIO_CANCELED if all requests were successfully
61 canceled.
62 It returns
63 .B AIO_NOTCANCELED
64 when at least one of the
65 requests specified was not canceled because it was in progress.
66 In this case one may check the status of individual requests using
67 .BR aio_error (3).
68 This function returns AIO_ALLDONE when all requests had
69 been completed already before this call.
70 When some error occurs, \-1 is returned, and
71 .I errno
72 is set appropriately.
73 .SH ERRORS
74 .TP
75 .B EBADF
76 .I fd
77 is not a valid file descriptor.
78 .SH "CONFORMING TO"
79 POSIX.1-2001
80 .SH "SEE ALSO"
81 .BR aio_error (3),
82 .BR aio_fsync (3),
83 .BR aio_read (3),
84 .BR aio_return (3),
85 .BR aio_suspend (3),
86 .BR aio_write (3)