1IO_SUBMIT(2) Linux Programmer's Manual IO_SUBMIT(2)
2
3
4
6 io_submit - Submit asynchronous I/O blocks for processing
7
9 #include <libaio.h>
10
11
12 int io_submit (aio_context_t ctx_id, long nr, struct iocb **iocbpp);
13
14
16 io_submit() queues nr I/O request blocks for processing in the AIO con‐
17 text ctx_id. iocbpp should be an array of nr AIO request blocks, which
18 will be submitted to context ctx_id.
19
20
22 io_submit() returns the number of iocbs submitted and 0 if nr is zero.
23
24
26 EINVAL The aio_context specified by ctx_id is invalid. nr is less than
27 0. The iocb at *iocbpp[0] is not properly initialized, or the
28 operation specified is invalid for the file descriptor in the
29 iocb.
30
31
32 EFAULT One of the data structures points to invalid data.
33
34
35 EBADF The file descriptor specified in the first iocb is invalid.
36
37
38 EAGAIN Insufficient resources are available to queue any iocbs.
39
40
41 ENOSYS io_submit() is not implemented on this architecture.
42
43
45 io_submit() is Linux specific and should not be used in programs that
46 are intended to be portable.
47
48
50 The asynchronous I/O system calls first appeared in Linux 2.5, August
51 2002.
52
53
55 io_setup(2), io_destroy(2), io_getevents(2), io_cancel(2).
56
57
59 The asynchronous I/O system calls were written by Benjamin LaHaise.
60
61
63 Kent Yoder.
64
65
66
67Linux 2.4 2003-02-21 IO_SUBMIT(2)