1 .\" Copyright (C) 2003 Free Software Foundation, Inc.
3 .\" %%%LICENSE_START(GPL_NOVERSION_ONELINE)
4 .\" This file is distributed according to the GNU General Public License.
7 .TH IO_SUBMIT 2 2012-07-13 "Linux" "Linux Programmer's Manual"
9 io_submit \- submit asynchronous I/O blocks for processing
12 .BR "#include <linux/aio_abi.h>" " /* Defines needed types */"
14 .BI "int io_submit(aio_context_t " ctx_id ", long " nr \
15 ", struct iocb **" iocbpp );
19 There is no glibc wrapper for this system call; see NOTES.
25 queues \fInr\fP I/O request blocks for processing in
26 the AIO context \fIctx_id\fP.
29 argument should be an array of \fInr\fP AIO control blocks,
30 which will be submitted to context \fIctx_id\fP.
34 returns the number of \fIiocb\fPs submitted (which may be
35 0 if \fInr\fP is zero).
36 For the failure return, see NOTES.
40 Insufficient resources are available to queue any \fIiocb\fPs.
43 The file descriptor specified in the first \fIiocb\fP is invalid.
46 One of the data structures points to invalid data.
49 The AIO context specified by \fIctx_id\fP is invalid.
50 \fInr\fP is less than 0.
53 is not properly initialized,
54 or the operation specified is invalid for the file descriptor
59 is not implemented on this architecture.
62 The asynchronous I/O system calls first appeared in Linux 2.5.
66 is Linux-specific and should not be used in
67 programs that are intended to be portable.
69 Glibc does not provide a wrapper function for this system call.
70 You could invoke it using
72 But instead, you probably want to use the
74 wrapper function provided by
75 .\" http://git.fedorahosted.org/git/?p=libaio.git
80 wrapper function uses a different type
82 .\" But glibc is confused, since <libaio.h> uses 'io_context_t' to declare
89 wrapper does not follow the usual C library conventions for indicating errors:
90 on error it returns a negated error number
91 (the negative of one of the values listed in ERRORS).
92 If the system call is invoked via
94 then the return value follows the usual conventions for
95 indicating an error: \-1, with
97 set to a (positive) value that indicates the error.
101 .BR io_getevents (2),
107 This page is part of release 3.67 of the Linux
110 A description of the project,
111 information about reporting bugs,
112 and the latest version of this page,
114 \%http://www.kernel.org/doc/man\-pages/.