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 .TH IO_SUBMIT 2 2012-07-13 "Linux" "Linux Programmer's Manual"
7 io_submit \- submit asynchronous I/O blocks for processing
10 .BR "#include <linux/aio_abi.h>" " /* Defines needed types */"
12 .BI "int io_submit(aio_context_t " ctx_id ", long " nr \
13 ", struct iocb **" iocbpp );
17 There is no glibc wrapper for this system call; see NOTES.
23 queues \fInr\fP I/O request blocks for processing in
24 the AIO context \fIctx_id\fP.
27 argument should be an array of \fInr\fP AIO control blocks,
28 which will be submitted to context \fIctx_id\fP.
32 returns the number of \fIiocb\fPs submitted (which may be
33 0 if \fInr\fP is zero).
34 For the failure return, see NOTES.
38 Insufficient resources are available to queue any \fIiocb\fPs.
41 The file descriptor specified in the first \fIiocb\fP is invalid.
44 One of the data structures points to invalid data.
47 The AIO context specified by \fIctx_id\fP is invalid.
48 \fInr\fP is less than 0.
51 is not properly initialized,
52 or the operation specified is invalid for the file descriptor
57 is not implemented on this architecture.
60 The asynchronous I/O system calls first appeared in Linux 2.5.
64 is Linux-specific and should not be used in
65 programs that are intended to be portable.
67 Glibc does not provide a wrapper function for this system call.
68 You could invoke it using
70 But instead, you probably want to use the
72 wrapper function provided by
73 .\" http://git.fedorahosted.org/git/?p=libaio.git
78 wrapper function uses a different type
80 .\" But glibc is confused, since <libaio.h> uses 'io_context_t' to declare
87 wrapper does not follow the usual C library conventions for indicating errors:
88 on error it returns a negated error number
89 (the negative of one of the values listed in ERRORS).
90 If the system call is invoked via
92 then the return value follows the usual conventions for
93 indicating an error: \-1, with
95 set to a (positive) value that indicates the error.