io_destroy2
Destroy an asynchronous i/o context
Usage
#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);
Library
Standard C library (libc, -lc)
Overview
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
|
|
Versions
libaio ⟨https://pagure.io/libaio⟩ provides a wrapper function with the same name, but different prototype and return value. You probably want to use that wrapper.
Releases
12 releases since Debian 3.1 (Sarge); the text changed 11 times.