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.
5 .\" .de Sh \" Subsection
13 .\" .de Sp \" Vertical space (when we can't use .PP)
17 .\" .de Ip \" List item
19 .\" .ie \\n(.$>=3 .ne \\$3
23 .TH "IO_SUBMIT" 2 "2003-02-21" "Linux 2.4" "Linux Programmer's Manual"
25 io_submit \- submit asynchronous I/O blocks for processing
30 .B #include <linux/aio.h>
33 .BI "int io_submit(aio_context_t " ctx_id ", long " nr \
34 ", struct iocb **" iocbpp );
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.
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.
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
59 One of the data structures points to invalid data.
62 The file descriptor specified in the first \fIiocb\fR is invalid.
65 Insufficient resources are available to queue any \fIiocb\fRs.
68 \fBio_submit\fR() is not implemented on this architecture.
71 \fBio_submit\fR() is Linux specific and should not be used in
72 programs that are intended to be portable.
75 The asynchronous I/O system calls first appeared in Linux 2.5, August 2002.
78 \fBio_setup\fR(2), \fBio_destroy\fR(2), \fBio_getevents\fR(2),
82 .\" The asynchronous I/O system calls were written by Benjamin LaHaise.