1IO_DESTROY(2)              Linux Programmer's Manual             IO_DESTROY(2)
2
3
4

NAME

6       io_destroy - destroy an asynchronous I/O context
7

SYNOPSIS

9       #include <linux/aio_abi.h>    /* Definition of aio_context_t */
10       #include <sys/syscall.h>      /* Definition of SYS_* constants */
11       #include <unistd.h>
12
13       int syscall(SYS_io_destroy, aio_context_t ctx_id);
14
15       Note: glibc provides no wrapper for io_destroy(), necessitating the use
16       of syscall(2).
17

DESCRIPTION

19       Note: this page describes the raw Linux  system  call  interface.   The
20       wrapper  function  provided  by  libaio  uses  a different type for the
21       ctx_id argument.  See NOTES.
22
23       The io_destroy() system call will attempt  to  cancel  all  outstanding
24       asynchronous  I/O  operations against ctx_id, will block on the comple‐
25       tion of all operations that could not be canceled, and will destroy the
26       ctx_id.
27

RETURN VALUE

29       On success, io_destroy() returns 0.  For the failure return, see NOTES.
30

ERRORS

32       EFAULT The context pointed to is invalid.
33
34       EINVAL The AIO context specified by ctx_id is invalid.
35
36       ENOSYS io_destroy() is not implemented on this architecture.
37

VERSIONS

39       The asynchronous I/O system calls first appeared in Linux 2.5.
40

CONFORMING TO

42       io_destroy()  is Linux-specific and should not be used in programs that
43       are intended to be portable.
44

NOTES

46       You probably want to use the io_destroy() wrapper function provided  by
47       libaio.
48
49       Note  that  the  libaio wrapper function uses a different type (io_con‐
50       text_t) for the ctx_id argument.  Note also  that  the  libaio  wrapper
51       does  not follow the usual C library conventions for indicating errors:
52       on error it returns a negated error number (the negative of one of  the
53       values   listed  in  ERRORS).   If  the  system  call  is  invoked  via
54       syscall(2), then the return value follows the usual conventions for in‐
55       dicating  an error: -1, with errno set to a (positive) value that indi‐
56       cates the error.
57

SEE ALSO

59       io_cancel(2), io_getevents(2), io_setup(2), io_submit(2), aio(7)
60

COLOPHON

62       This page is part of release 5.13 of the Linux  man-pages  project.   A
63       description  of  the project, information about reporting bugs, and the
64       latest    version    of    this    page,    can     be     found     at
65       https://www.kernel.org/doc/man-pages/.
66
67
68
69Linux                             2021-03-22                     IO_DESTROY(2)
Impressum