1 .\" Copyright (C) 2003 Free Software Foundation, Inc.
3 .\" SPDX-License-Identifier: GPL-1.0-or-later
5 .TH IO_CANCEL 2 2021-03-22 "Linux" "Linux Programmer's Manual"
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 NOTES.
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 The asynchronous I/O system calls first appeared in Linux 2.5.
72 is Linux-specific and should not be used
73 in programs that are intended to be portable.
75 You probably want to use the
77 wrapper function provided by
78 .\" http://git.fedorahosted.org/git/?p=libaio.git
83 wrapper function uses a different type
85 .\" But glibc is confused, since <libaio.h> uses 'io_context_t' to declare
92 wrapper does not follow the usual C library conventions for indicating errors:
93 on error it returns a negated error number
94 (the negative of one of the values listed in ERRORS).
95 If the system call is invoked via
97 then the return value follows the usual conventions for
98 indicating an error: \-1, with
100 set to a (positive) value that indicates the error.
103 .BR io_getevents (2),