]>
Commit | Line | Data |
---|---|---|
fea681da MK |
1 | .\" Copyright (C) 2003 Free Software Foundation, Inc. |
2 | .\" This file is distributed according to the GNU General Public License. | |
3 | .\" See the file COPYING in the top level source directory for details. | |
4 | .\" | |
d12c1424 MK |
5 | .\" .de Sh \" Subsection |
6 | .\" .br | |
7 | .\" .if t .Sp | |
8 | .\" .ne 5 | |
9 | .\" .PP | |
10 | .\" \fB\\$1\fR | |
11 | .\" .PP | |
12 | .\" .. | |
13 | .\" .de Sp \" Vertical space (when we can't use .PP) | |
14 | .\" .if t .sp .5v | |
15 | .\" .if n .sp | |
16 | .\" .. | |
17 | .\" .de Ip \" List item | |
18 | .\" .br | |
19 | .\" .ie \\n(.$>=3 .ne \\$3 | |
20 | .\" .el .ne 3 | |
21 | .\" .IP "\\$1" \\$2 | |
22 | .\" .. | |
3d5a3539 | 23 | .TH IO_SUBMIT 2 2003-02-21 "Linux 2.4" "Linux Programmer's Manual" |
fea681da | 24 | .SH NAME |
d12c1424 | 25 | io_submit \- submit asynchronous I/O blocks for processing |
fea681da | 26 | .SH "SYNOPSIS" |
d12c1424 MK |
27 | .nf |
28 | .\" .ad l | |
29 | .\" .hy 0 | |
30 | .B #include <linux/aio.h> | |
fea681da | 31 | .sp |
d12c1424 MK |
32 | .\" .HP 16 |
33 | .BI "int io_submit(aio_context_t " ctx_id ", long " nr \ | |
34 | ", struct iocb **" iocbpp ); | |
35 | .\" .ad | |
36 | .\" .hy | |
37 | .fi | |
fea681da | 38 | .SH "DESCRIPTION" |
fea681da | 39 | .PP |
60a90ecd MK |
40 | .BR io_submit () |
41 | queues \fInr\fR I/O request blocks for processing in | |
c13182ef MK |
42 | the AIO context \fIctx_id\fR. \fIiocbpp\fR should be an array of |
43 | \fInr\fR AIO request blocks, | |
d12c1424 | 44 | which will be submitted to context \fIctx_id\fR. |
fea681da | 45 | .SH "RETURN VALUE" |
fea681da | 46 | .PP |
c13182ef | 47 | On success, |
60a90ecd MK |
48 | .BR io_submit () |
49 | returns the number of \fIiocb\fRs submitted (which may be | |
d12c1424 MK |
50 | 0 if \fInr\fR is zero); |
51 | on failure, it returns one of the errors listed under ERRORS. | |
fea681da | 52 | .SH "ERRORS" |
fea681da | 53 | .TP |
d12c1424 | 54 | .B EINVAL |
c13182ef MK |
55 | The \fIaio_context\fR specified by \fIctx_id\fR is invalid. |
56 | \fInr\fR is less than 0. The \fIiocb\fR at *iocbpp[0] is not properly | |
57 | initialized, or the operation specified is invalid for the file descriptor | |
fea681da | 58 | in the \fIiocb\fR. |
fea681da | 59 | .TP |
d12c1424 | 60 | .B EFAULT |
fea681da | 61 | One of the data structures points to invalid data. |
fea681da | 62 | .TP |
d12c1424 | 63 | .B EBADF |
fea681da | 64 | The file descriptor specified in the first \fIiocb\fR is invalid. |
fea681da | 65 | .TP |
d12c1424 | 66 | .B EAGAIN |
fea681da | 67 | Insufficient resources are available to queue any \fIiocb\fRs. |
fea681da | 68 | .TP |
d12c1424 | 69 | .B ENOSYS |
60a90ecd MK |
70 | .BR io_submit () |
71 | is not implemented on this architecture. | |
a1d5f77c MK |
72 | .SH "VERSIONS" |
73 | .PP | |
74 | The asynchronous I/O system calls first appeared in Linux 2.5, August 2002. | |
fea681da | 75 | .SH "CONFORMING TO" |
fea681da | 76 | .PP |
60a90ecd MK |
77 | .BR io_submit () |
78 | is Linux specific and should not be used in | |
75b48e9d | 79 | programs that are intended to be portable. |
fea681da | 80 | .SH "SEE ALSO" |
fea681da | 81 | .PP |
60a90ecd MK |
82 | .BR io_setup (2), |
83 | .BR io_destroy (2), | |
84 | .BR io_getevents (2), | |
85 | .BR io_cancel (2). | |
d12c1424 MK |
86 | .\" .SH "NOTES" |
87 | .\" .PP | |
88 | .\" The asynchronous I/O system calls were written by Benjamin LaHaise. | |
89 | .\" .SH AUTHOR | |
90 | .\" Kent Yoder. |