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" "Linux Programmer's Manual"
25 io_submit \- submit asynchronous I/O blocks for processing
30 .B #include <libaio.h>
31 .\" #include <linux/aio.h>
34 .BI "int io_submit(aio_context_t " ctx_id ", long " nr \
35 ", struct iocb **" iocbpp );
39 Link with \fI-laio\fP.
44 queues \fInr\fR I/O request blocks for processing in
45 the AIO context \fIctx_id\fR. \fIiocbpp\fR should be an array of
46 \fInr\fR AIO request blocks,
47 which will be submitted to context \fIctx_id\fR.
52 returns the number of \fIiocb\fRs submitted (which may be
53 0 if \fInr\fR is zero);
54 on failure, it returns one of the errors listed under ERRORS.
58 The \fIaio_context\fR specified by \fIctx_id\fR is invalid.
59 \fInr\fR is less than 0.
60 The \fIiocb\fR at *iocbpp[0] is not properly initialized,
61 or the operation specified is invalid for the file descriptor
65 One of the data structures points to invalid data.
68 The file descriptor specified in the first \fIiocb\fR is invalid.
71 Insufficient resources are available to queue any \fIiocb\fRs.
75 is not implemented on this architecture.
78 The asynchronous I/O system calls first appeared in Linux 2.5, August 2002.
82 is Linux specific and should not be used in
83 programs that are intended to be portable.
92 .\" The asynchronous I/O system calls were written by Benjamin LaHaise.