1 .\" Copyright (C) 2003 Free Software Foundation, Inc.
2 .\" This file is distributed according to the GNU General Public License.
3 .\" See the file COPYING in the top level source directory for details.
6 .TH IO_DESTROY 2 2012-05-08 "Linux" "Linux Programmer's Manual"
8 io_destroy \- destroy an asynchronous I/O context
11 .BR "#include <linux/aio_abi.h>" " /* Defines needed types */"
13 .BI "int io_destroy(aio_context_t " ctx_id );
20 removes the asynchronous I/O context specified by
23 I/O contexts and then destroys it.
24 It can also cancel any outstanding asynchronous I/O
25 actions on \fIctx_id\fP and block on completion.
30 For the failure return, see NOTES.
34 The context pointed to is invalid.
37 The AIO context specified by \fIctx_id\fP is invalid.
41 is not implemented on this architecture.
44 The asynchronous I/O system calls first appeared in Linux 2.5.
48 is Linux-specific and should not be used in programs
49 that are intended to be portable.
51 Glibc does not provide a wrapper function for this system call.
52 You could invoke it using
54 But instead, you probably want to use the
56 wrapper function provided by
57 .\" http://git.fedorahosted.org/git/?p=libaio.git
62 wrapper function uses a different type
64 .\" But glibc is confused, since <libaio.h> uses 'io_context_t' to declare
71 wrapper does not follow the usual C library conventions for indicating errors:
72 on error it returns a negated error number
73 (the negative of one of the values listed in ERRORS).
74 If the system call is invoked via
76 then the return value follows the usual conventions for
77 indicating an error: \-1, with
79 set to a (positive) value that indicates the error.