io_submit(2) System Calls Manual io_submit(2) io_submit - - LIBRARY Standard C library (libc, -lc) Alternatively, Asynchronous I/O library (libaio, -laio); see VERSIONS. #include /* */ int io_submit(aio_context_t ctx_id, long nr, struct iocb **iocbpp); 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_id argument. See VERSIONS. io_submit() nr - AIO ctx_id. iocbpp nr AIO, ctx_id. iocb ( -), linux/aio_abi.h, , -. #include struct iocb { __u64 aio_data; __u32 PADDED(aio_key, aio_rw_flags); __u16 aio_lio_opcode; __s16 aio_reqprio; __u32 aio_fildes; __u64 aio_buf; __u64 aio_nbytes; __s64 aio_offset; __u64 aio_reserved2; __u32 aio_flags; __u32 aio_resfd; }; : aio_data data io_event - ( io_getevents(2)). aio_key , . io_submit(). aio_rw_flags -, . : RWF_APPEND ( Linux 4.16) . pwritev2(2), O_APPEND open(2). aio_offset . . RWF_DSYNC ( Linux 4.13) -. pwritev2(2), O_DSYNC open(2). RWF_HIPRI ( Linux 4.13) ; , RWF_NOWAIT ( Linux 4.14) , - , , , . - , -EAGAIN res io_event ( io_getevents(2)). RWF_SYNC ( Linux 4.13) -. pwritev2(2), O_SYNC open(2). aio_lio_opcode -, iocb. , linux/aio_abi.h: enum { IOCB_CMD_PREAD = 0, IOCB_CMD_PWRITE = 1, IOCB_CMD_FSYNC = 2, IOCB_CMD_FDSYNC = 3, IOCB_CMD_POLL = 5, IOCB_CMD_NOOP = 6, IOCB_CMD_PREADV = 7, IOCB_CMD_PWRITEV = 8, }; aio_reqprio . aio_fildes , -. aio_buf , . aio_nbytes , aio_buf. aio_offset , -. aio_flags , iocb. : IOCB_FLAG_RESFD - aio_resfd . IOCB_FLAG_IOPRIO ( Linux 4.18) aio_reqprio IOPRIO_VALUE, linux/ioprio.h. aio_resfd -. On success, io_submit() returns the number of iocbs submitted (which may be less than nr, or 0 if nr is zero). For the failure return, see VERSIONS. EAGAIN iocb. EBADF , iocb. EFAULT . EINVAL AIO, ctx_id. nr 0. iocb *iocbpp[0] , iocb aio_reqprio. ENOSYS io_submit() . EPERM aio_reqprio IOPRIO_CLASS_RT, CAP_SYS_ADMIN. 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_submit() wrapper function provided by libaio. , libaio (io_context_t) ctx_id. , libaio C : ( ). syscall(2), : -1 errno () . Linux. Linux 2.5. io_cancel(2), io_destroy(2), io_getevents(2), io_setup(2), aio(7) Azamat Hackimov , Dmitriy S. Seregin , Yuri Kozlov ; GNU (GNU General Public License - GPL, 3 ) , - . - , , <>. Linux man-pages 6.8 2 2024 . io_submit(2)