]> git.ipfire.org Git - thirdparty/man-pages.git/blob - man2/io_cancel.2
Import of man-pages 1.70
[thirdparty/man-pages.git] / man2 / io_cancel.2
1 .\" Copyright (C) 2003 Free Software Foundation, Inc.
2 .\" This file is distributed according to the GNU General Public License.
3 .\" See the file COPYING in the top level source directory for details.
4 .\"
5 .de Sh \" Subsection
6 .br
7 .if t .Sp
8 .ne 5
9 .PP
10 \fB\\$1\fR
11 .PP
12 ..
13 .de Sp \" Vertical space (when we can't use .PP)
14 .if t .sp .5v
15 .if n .sp
16 ..
17 .de Ip \" List item
18 .br
19 .ie \\n(.$>=3 .ne \\$3
20 .el .ne 3
21 .IP "\\$1" \\$2
22 ..
23 .TH "IO_CANCEL" 2 "2003-02-21" "Linux 2.4" "Linux Programmer's Manual"
24 .SH NAME
25 io_cancel \- Cancel an outstanding asynchronous I/O operation
26 .SH "SYNOPSIS"
27 .ad l
28 .hy 0
29
30 #include <linux/aio.h>
31 .sp
32 .HP 16
33 long\ \fBio_cancel\fR\ (aio_context_t\ \fIctx_id\fR, struct\ iocb\ \fI*iocb\fR, struct\ io_event\ \fI*result\fR);
34 .ad
35 .hy
36
37 .SH "DESCRIPTION"
38
39 .PP
40 \fBio_cancel\fR attempts to cancel an asynchronous I/O operation
41 previously submitted with the \fBio_submit\fR system call.
42 \fIctx_id\fR is the AIO context ID of the operation to be cancelled.
43 If the AIO context is found, the event will be cancelled and then copied
44 into the memory pointed to by \fIresult\fR without being placed
45 into the completion queue.
46
47 .SH "RETURN VALUE"
48
49 .PP
50 \fBio_cancel\fR returns 0 on success; otherwise, it returns one of the
51 errors listed in the "Errors" section.
52
53 .SH "ERRORS"
54
55 .TP
56 EINVAL
57 The AIO context specified by \fIctx_id\fR is invalid.
58
59 .TP
60 EFAULT
61 One of the data structures points to invalid data.
62
63 .TP
64 EAGAIN
65 The \fIiocb\fR specified was not cancelled.
66
67 .TP
68 ENOSYS
69 \fBio_cancel\fR is not implemented on this architecture.
70
71 .SH "VERSIONS"
72
73 .PP
74 The asynchronous I/O system calls first appeared in Linux 2.5, August 2002.
75
76 .SH "CONFORMING TO"
77
78 .PP
79 \fBio_cancel\fR is Linux specific and should not be used in programs that are intended to be portable.
80
81 .SH "SEE ALSO"
82
83 .PP
84 \fBio_setup\fR(2), \fBio_destroy\fR(2), \fBio_getevents\fR(2), \fBio_submit\fR(2).
85
86 .SH "NOTES"
87
88 .PP
89 The asynchronous I/O system calls were written by Benjamin LaHaise.
90
91 .SH AUTHOR
92 Kent Yoder.