1IO_DESTROY(2) Linux Programmer's Manual IO_DESTROY(2)
2
3
4
6 io_destroy - destroy an asynchronous I/O context
7
9 #include <linux/aio_abi.h> /* Defines needed types */
10
11 int io_destroy(aio_context_t ctx_id);
12
13 Note: There is no glibc wrapper for this system call; see NOTES.
14
16 Note: this page describes the raw Linux system call interface. The
17 wrapper function provided by libaio uses a different type for the
18 ctx_id argument. See NOTES.
19
20 The io_destroy() system call will attempt to cancel all outstanding
21 asynchronous I/O operations against ctx_id, will block on the comple‐
22 tion of all operations that could not be canceled, and will destroy the
23 ctx_id.
24
26 On success, io_destroy() returns 0. For the failure return, see NOTES.
27
29 EFAULT The context pointed to is invalid.
30
31 EINVAL The AIO context specified by ctx_id is invalid.
32
33 ENOSYS io_destroy() is not implemented on this architecture.
34
36 The asynchronous I/O system calls first appeared in Linux 2.5.
37
39 io_destroy() is Linux-specific and should not be used in programs that
40 are intended to be portable.
41
43 Glibc does not provide a wrapper function for this system call. You
44 could invoke it using syscall(2). But instead, you probably want to
45 use the io_destroy() wrapper function provided by libaio.
46
47 Note that the libaio wrapper function uses a different type (io_con‐
48 text_t) for the ctx_id argument. Note also that the libaio wrapper
49 does not follow the usual C library conventions for indicating errors:
50 on error it returns a negated error number (the negative of one of the
51 values listed in ERRORS). If the system call is invoked via
52 syscall(2), then the return value follows the usual conventions for in‐
53 dicating an error: -1, with errno set to a (positive) value that indi‐
54 cates the error.
55
57 io_cancel(2), io_getevents(2), io_setup(2), io_submit(2), aio(7)
58
60 This page is part of release 5.10 of the Linux man-pages project. A
61 description of the project, information about reporting bugs, and the
62 latest version of this page, can be found at
63 https://www.kernel.org/doc/man-pages/.
64
65
66
67Linux 2020-12-21 IO_DESTROY(2)