io_destroy - destroy an asynchronous I/O context
#include <linux/aio_abi.h> /* Definition of aio_context_t */
#include <sys/syscall.h> /* Definition of SYS_* constants */
#include <unistd.h>
int syscall(SYS_io_destroy, aio_context_t ctx_id);
Note
: glibc provides no wrapper for
io_destroy(), necessitating the use of
syscall(2).
Note
: this page describes the raw Linux system call
interface. The wrapper function provided by libaio
uses a
different type for the ctx_id
argument. See VERSIONS.
The io_destroy() system call will attempt to cancel
all outstanding asynchronous I/O operations against ctx_id
,
will block on the completion of all operations that could not be
canceled, and will destroy the ctx_id
.
On success, io_destroy() returns 0. For the failure return, see VERSIONS.
io_cancel(2), io_getevents(2), io_setup(2), io_submit(2), aio(7)