io_setup(2) System Calls Manual io_setup(2) io_setup - - C (libc, -lc) Alternatively, Asynchronous I/O library (libaio, -laio); see VERSIONS. #include /* */ long io_setup(unsigned int nr_events, aio_context_t *ctx_idp); Note: There is no glibc wrapper for this system call; see VERSIONS. Note: this page describes the raw Linux system call interface. The wrapper function provided by libaio uses a different type for the ctx_idp argument. See VERSIONS. io_setup() -, nr_events . ctx_idp AIO 0 . AIO, *ctx_idp . On success, io_setup() returns 0. For the failure return, see VERSIONS. EAGAIN The specified nr_events exceeds the limit of available events, as defined in /proc/sys/fs/aio-max-nr (see proc(5)). EFAULT ctx_idp . EINVAL ctx_idp , nr_events . nr_events 0. ENOMEM . ENOSYS io_setup() . glibc does not provide a wrapper for this system call. You could invoke it using syscall(2). But instead, you probably want to use the io_setup() wrapper function provided by libaio. , libaio (io_context_t *) ctx_idp. , libaio C : ( ). syscall(2), : -1 errno () . Linux. Linux 2.5. io_cancel(2), io_destroy(2), io_getevents(2), io_submit(2), aio(7) () Azamat Hackimov , Dmitriy S. Seregin , Yuri Kozlov ; GNU (GNU General Public License - GPL, 3 ) , - . - , , () () () <>. Linux 6.9.1 2 2024 . io_setup(2)