www.LinuxHowtos.org
io_destroy
Section: System Calls (2)Updated: 202-0-11
Index Return to Main Contents
NAME
io_destroy - destroy an asynchronous I/O contextLIBRARY
Standard C library (libc,~-lc)SYNOPSIS
#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);
DESCRIPTION
Note: you probably want to use the io_destroy(3) wrapper function provided by libaio; 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.RETURN VALUE
On success, io_destroy() returns 0. On error, -1 is returned, and errno is set to indicate the error.ERRORS
- EFAULT
- ctx_id was not a valid address.
- EINVAL
- The AIO context specified by ctx_id is invalid.
- ENOSYS
- io_destroy() is not implemented on this architecture.
VERSIONS
libaio provides a wrapper function with the same name, but different prototype and return value. You probably want to use that wrapper.STANDARDS
Linux.HISTORY
Linux 2.5.SEE ALSO
io_cancel(2), io_getevents(2), io_setup(2), io_submit(2), io_destroy(3), aio(7)