1io_destroy(2)                 System Calls Manual                io_destroy(2)
2
3
4

NAME

6       io_destroy - destroy an asynchronous I/O context
7

LIBRARY

9       Standard C library (libc, -lc)
10

SYNOPSIS

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

DESCRIPTION

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

RETURN VALUE

32       On  success,  io_destroy() returns 0.  For the failure return, see VER‐
33       SIONS.
34

ERRORS

36       EFAULT The context pointed to is invalid.
37
38       EINVAL The AIO context specified by ctx_id is invalid.
39
40       ENOSYS io_destroy() is not implemented on this architecture.
41

VERSIONS

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

STANDARDS

56       Linux.
57

HISTORY

59       Linux 2.5.
60

SEE ALSO

62       io_cancel(2), io_getevents(2), io_setup(2), io_submit(2), aio(7)
63
64
65
66Linux man-pages 6.05              2023-03-30                     io_destroy(2)
Impressum