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>          /* 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

DESCRIPTION

16       The  io_destroy()  system  call  will attempt to cancel all outstanding
17       asynchronous I/O operations against ctx_id, will block on  the  comple‐
18       tion of all operations that could not be canceled, and will destroy the
19       ctx_id.
20

RETURN VALUE

22       On success, io_destroy() returns 0.  For the failure return, see NOTES.
23

ERRORS

25       EFAULT The context pointed to is invalid.
26
27       EINVAL The AIO context specified by ctx_id is invalid.
28
29       ENOSYS io_destroy() is not implemented on this architecture.
30

VERSIONS

32       The asynchronous I/O system calls first appeared in Linux 2.5.
33

CONFORMING TO

35       io_destroy() is Linux-specific and should not be used in programs  that
36       are intended to be portable.
37

NOTES

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

SEE ALSO

53       io_cancel(2), io_getevents(2), io_setup(2), io_submit(2), aio(7)
54

COLOPHON

56       This page is part of release 3.53 of the Linux  man-pages  project.   A
57       description  of  the project, and information about reporting bugs, can
58       be found at http://www.kernel.org/doc/man-pages/.
59
60
61
62Linux                             2013-04-08                     IO_DESTROY(2)
Impressum