1 .\" Copyright (C) 2003 Free Software Foundation, Inc.
3 .\" SPDX-License-Identifier: GPL-1.0-or-later
5 .TH io_cancel 2 (date) "Linux man-pages (unreleased)"
7 io_cancel \- cancel an outstanding asynchronous I/O operation
10 .RI ( libc ", " \-lc )
12 Alternatively, Asynchronous I/O library
13 .RI ( libaio ", " \-laio );
17 .BR "#include <linux/aio_abi.h>" " /* Definition of needed types */"
18 .BR "#include <sys/syscall.h>" " /* Definition of " SYS_* " constants */"
19 .B #include <unistd.h>
21 .BI "int syscall(SYS_io_cancel, aio_context_t " ctx_id ", struct iocb *" iocb ,
22 .BI " struct io_event *" result );
26 this page describes the raw Linux system call interface.
27 The wrapper function provided by
29 uses a different type for the
37 attempts to cancel an asynchronous I/O operation previously submitted with
41 argument describes the operation to be canceled and the
43 argument is the AIO context to which the operation was submitted.
44 If the operation is successfully canceled, the event will be copied into
45 the memory pointed to by
47 without being placed into the
53 For the failure return, see VERSIONS.
57 The \fIiocb\fP specified was not canceled.
60 One of the data structures points to invalid data.
63 The AIO context specified by \fIctx_id\fP is invalid.
67 is not implemented on this architecture.
69 You probably want to use the
71 wrapper function provided by
72 .\" http://git.fedorahosted.org/git/?p=libaio.git
77 wrapper function uses a different type
79 .\" But glibc is confused, since <libaio.h> uses 'io_context_t' to declare
86 wrapper does not follow the usual C library conventions for indicating errors:
87 on error it returns a negated error number
88 (the negative of one of the values listed in ERRORS).
89 If the system call is invoked via
91 then the return value follows the usual conventions for
92 indicating an error: \-1, with
94 set to a (positive) value that indicates the error.
101 .BR io_getevents (2),