|
Packit |
7cfc04 |
.\" Copyright (C) 2003 Free Software Foundation, Inc.
|
|
Packit |
7cfc04 |
.\"
|
|
Packit |
7cfc04 |
.\" %%%LICENSE_START(GPL_NOVERSION_ONELINE)
|
|
Packit |
7cfc04 |
.\" This file is distributed according to the GNU General Public License.
|
|
Packit |
7cfc04 |
.\" %%%LICENSE_END
|
|
Packit |
7cfc04 |
.\"
|
|
Packit |
7cfc04 |
.TH IO_DESTROY 2 2017-09-15 "Linux" "Linux Programmer's Manual"
|
|
Packit |
7cfc04 |
.SH NAME
|
|
Packit |
7cfc04 |
io_destroy \- destroy an asynchronous I/O context
|
|
Packit |
7cfc04 |
.SH SYNOPSIS
|
|
Packit |
7cfc04 |
.nf
|
|
Packit |
7cfc04 |
.BR "#include <linux/aio_abi.h>" " /* Defines needed types */"
|
|
Packit |
7cfc04 |
.PP
|
|
Packit |
7cfc04 |
.BI "int io_destroy(aio_context_t " ctx_id );
|
|
Packit |
7cfc04 |
.fi
|
|
Packit |
7cfc04 |
.PP
|
|
Packit |
7cfc04 |
.IR Note :
|
|
Packit |
7cfc04 |
There is no glibc wrapper for this system call; see NOTES.
|
|
Packit |
7cfc04 |
.SH DESCRIPTION
|
|
Packit |
7cfc04 |
.PP
|
|
Packit |
7cfc04 |
The
|
|
Packit |
7cfc04 |
.BR io_destroy ()
|
|
Packit |
7cfc04 |
system call
|
|
Packit |
7cfc04 |
will attempt to cancel all outstanding asynchronous I/O operations against
|
|
Packit |
7cfc04 |
.IR ctx_id ,
|
|
Packit |
7cfc04 |
will block on the completion of all operations
|
|
Packit |
7cfc04 |
that could not be canceled, and will destroy the
|
|
Packit |
7cfc04 |
.IR ctx_id .
|
|
Packit |
7cfc04 |
.SH RETURN VALUE
|
|
Packit |
7cfc04 |
On success,
|
|
Packit |
7cfc04 |
.BR io_destroy ()
|
|
Packit |
7cfc04 |
returns 0.
|
|
Packit |
7cfc04 |
For the failure return, see NOTES.
|
|
Packit |
7cfc04 |
.SH ERRORS
|
|
Packit |
7cfc04 |
.TP
|
|
Packit |
7cfc04 |
.B EFAULT
|
|
Packit |
7cfc04 |
The context pointed to is invalid.
|
|
Packit |
7cfc04 |
.TP
|
|
Packit |
7cfc04 |
.B EINVAL
|
|
Packit |
7cfc04 |
The AIO context specified by \fIctx_id\fP is invalid.
|
|
Packit |
7cfc04 |
.TP
|
|
Packit |
7cfc04 |
.B ENOSYS
|
|
Packit |
7cfc04 |
.BR io_destroy ()
|
|
Packit |
7cfc04 |
is not implemented on this architecture.
|
|
Packit |
7cfc04 |
.SH VERSIONS
|
|
Packit |
7cfc04 |
.PP
|
|
Packit |
7cfc04 |
The asynchronous I/O system calls first appeared in Linux 2.5.
|
|
Packit |
7cfc04 |
.SH CONFORMING TO
|
|
Packit |
7cfc04 |
.PP
|
|
Packit |
7cfc04 |
.BR io_destroy ()
|
|
Packit |
7cfc04 |
is Linux-specific and should not be used in programs
|
|
Packit |
7cfc04 |
that are intended to be portable.
|
|
Packit |
7cfc04 |
.SH NOTES
|
|
Packit |
7cfc04 |
Glibc does not provide a wrapper function for this system call.
|
|
Packit |
7cfc04 |
You could invoke it using
|
|
Packit |
7cfc04 |
.BR syscall (2).
|
|
Packit |
7cfc04 |
But instead, you probably want to use the
|
|
Packit |
7cfc04 |
.BR io_destroy ()
|
|
Packit |
7cfc04 |
wrapper function provided by
|
|
Packit |
7cfc04 |
.\" http://git.fedorahosted.org/git/?p=libaio.git
|
|
Packit |
7cfc04 |
.IR libaio .
|
|
Packit |
7cfc04 |
.PP
|
|
Packit |
7cfc04 |
Note that the
|
|
Packit |
7cfc04 |
.I libaio
|
|
Packit |
7cfc04 |
wrapper function uses a different type
|
|
Packit |
7cfc04 |
.RI ( io_context_t )
|
|
Packit |
7cfc04 |
.\" But glibc is confused, since <libaio.h> uses 'io_context_t' to declare
|
|
Packit |
7cfc04 |
.\" the system call.
|
|
Packit |
7cfc04 |
for the
|
|
Packit |
7cfc04 |
.I ctx_id
|
|
Packit |
7cfc04 |
argument.
|
|
Packit |
7cfc04 |
Note also that the
|
|
Packit |
7cfc04 |
.I libaio
|
|
Packit |
7cfc04 |
wrapper does not follow the usual C library conventions for indicating errors:
|
|
Packit |
7cfc04 |
on error it returns a negated error number
|
|
Packit |
7cfc04 |
(the negative of one of the values listed in ERRORS).
|
|
Packit |
7cfc04 |
If the system call is invoked via
|
|
Packit |
7cfc04 |
.BR syscall (2),
|
|
Packit |
7cfc04 |
then the return value follows the usual conventions for
|
|
Packit |
7cfc04 |
indicating an error: \-1, with
|
|
Packit |
7cfc04 |
.I errno
|
|
Packit |
7cfc04 |
set to a (positive) value that indicates the error.
|
|
Packit |
7cfc04 |
.SH SEE ALSO
|
|
Packit |
7cfc04 |
.BR io_cancel (2),
|
|
Packit |
7cfc04 |
.BR io_getevents (2),
|
|
Packit |
7cfc04 |
.BR io_setup (2),
|
|
Packit |
7cfc04 |
.BR io_submit (2),
|
|
Packit |
7cfc04 |
.BR aio (7)
|
|
Packit |
7cfc04 |
.\" .SH AUTHOR
|
|
Packit |
7cfc04 |
.\" Kent Yoder.
|
|
Packit |
7cfc04 |
.SH COLOPHON
|
|
Packit |
7cfc04 |
This page is part of release 4.15 of the Linux
|
|
Packit |
7cfc04 |
.I man-pages
|
|
Packit |
7cfc04 |
project.
|
|
Packit |
7cfc04 |
A description of the project,
|
|
Packit |
7cfc04 |
information about reporting bugs,
|
|
Packit |
7cfc04 |
and the latest version of this page,
|
|
Packit |
7cfc04 |
can be found at
|
|
Packit |
7cfc04 |
\%https://www.kernel.org/doc/man\-pages/.
|