]> git.ipfire.org Git - thirdparty/man-pages.git/blame - man2/io_submit.2
Reordered sections to be more consistent, in some cases renaming
[thirdparty/man-pages.git] / man2 / io_submit.2
CommitLineData
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 25io_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 ()
41queues \fInr\fR I/O request blocks for processing in
c13182ef
MK
42the AIO context \fIctx_id\fR. \fIiocbpp\fR should be an array of
43\fInr\fR AIO request blocks,
d12c1424 44which will be submitted to context \fIctx_id\fR.
fea681da 45.SH "RETURN VALUE"
fea681da 46.PP
c13182ef 47On success,
60a90ecd
MK
48.BR io_submit ()
49returns the number of \fIiocb\fRs submitted (which may be
d12c1424
MK
500 if \fInr\fR is zero);
51on failure, it returns one of the errors listed under ERRORS.
fea681da 52.SH "ERRORS"
fea681da 53.TP
d12c1424 54.B EINVAL
c13182ef
MK
55The \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
57initialized, or the operation specified is invalid for the file descriptor
fea681da 58in the \fIiocb\fR.
fea681da 59.TP
d12c1424 60.B EFAULT
fea681da 61One of the data structures points to invalid data.
fea681da 62.TP
d12c1424 63.B EBADF
fea681da 64The file descriptor specified in the first \fIiocb\fR is invalid.
fea681da 65.TP
d12c1424 66.B EAGAIN
fea681da 67Insufficient resources are available to queue any \fIiocb\fRs.
fea681da 68.TP
d12c1424 69.B ENOSYS
60a90ecd
MK
70.BR io_submit ()
71is not implemented on this architecture.
a1d5f77c
MK
72.SH "VERSIONS"
73.PP
74The 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 ()
78is Linux specific and should not be used in
75b48e9d 79programs 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.