]> git.ipfire.org Git - thirdparty/man-pages.git/blob - man2/io_submit.2
Wrapped long lines, wrapped at sentence boundaries; stripped trailing
[thirdparty/man-pages.git] / man2 / io_submit.2
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 .\"
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 .\" ..
23 .TH "IO_SUBMIT" 2 "2003-02-21" "Linux 2.4" "Linux Programmer's Manual"
24 .SH NAME
25 io_submit \- submit asynchronous I/O blocks for processing
26 .SH "SYNOPSIS"
27 .nf
28 .\" .ad l
29 .\" .hy 0
30 .B #include <linux/aio.h>
31 .sp
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
38 .SH "DESCRIPTION"
39 .PP
40 \fBio_submit\fR() queues \fInr\fR I/O request blocks for processing in
41 the AIO context \fIctx_id\fR. \fIiocbpp\fR should be an array of
42 \fInr\fR AIO request blocks,
43 which will be submitted to context \fIctx_id\fR.
44 .SH "RETURN VALUE"
45 .PP
46 On success,
47 \fBio_submit\fR() returns the number of \fIiocb\fRs submitted (which may be
48 0 if \fInr\fR is zero);
49 on failure, it returns one of the errors listed under ERRORS.
50 .SH "ERRORS"
51 .TP
52 .B EINVAL
53 The \fIaio_context\fR specified by \fIctx_id\fR is invalid.
54 \fInr\fR is less than 0. The \fIiocb\fR at *iocbpp[0] is not properly
55 initialized, or the operation specified is invalid for the file descriptor
56 in the \fIiocb\fR.
57 .TP
58 .B EFAULT
59 One of the data structures points to invalid data.
60 .TP
61 .B EBADF
62 The file descriptor specified in the first \fIiocb\fR is invalid.
63 .TP
64 .B EAGAIN
65 Insufficient resources are available to queue any \fIiocb\fRs.
66 .TP
67 .B ENOSYS
68 \fBio_submit\fR() is not implemented on this architecture.
69 .SH "CONFORMING TO"
70 .PP
71 \fBio_submit\fR() is Linux specific and should not be used in
72 programs that are intended to be portable.
73 .SH "VERSIONS"
74 .PP
75 The asynchronous I/O system calls first appeared in Linux 2.5, August 2002.
76 .SH "SEE ALSO"
77 .PP
78 \fBio_setup\fR(2), \fBio_destroy\fR(2), \fBio_getevents\fR(2),
79 \fBio_cancel\fR(2).
80 .\" .SH "NOTES"
81 .\" .PP
82 .\" The asynchronous I/O system calls were written by Benjamin LaHaise.
83 .\" .SH AUTHOR
84 .\" Kent Yoder.