1IO_SUBMIT(2)               Linux Programmer's Manual              IO_SUBMIT(2)
2
3
4

NAME

6       io_submit - submit asynchronous I/O blocks for processing
7

SYNOPSIS

9       #include <libaio.h>
10
11       int io_submit(aio_context_t ctx_id, long nr, struct iocb **iocbpp);
12
13       Link with -laio.
14

DESCRIPTION

16       io_submit() queues nr I/O request blocks for processing in the AIO con‐
17       text ctx_id.  iocbpp should be an array of nr AIO control blocks, which
18       will be submitted to context ctx_id.
19

RETURN VALUE

21       On  success,  io_submit()  returns the number of iocbs submitted (which
22       may be 0 if nr is zero).  For the failure return, see NOTES.
23

ERRORS

25       EAGAIN Insufficient resources are available to queue any iocbs.
26
27       EBADF  The file descriptor specified in the first iocb is invalid.
28
29       EFAULT One of the data structures points to invalid data.
30
31       EINVAL The aio_context specified by ctx_id is invalid.  nr is less than
32              0.   The  iocb at *iocbpp[0] is not properly initialized, or the
33              operation specified is invalid for the file  descriptor  in  the
34              iocb.
35
36       ENOSYS io_submit() is not implemented on this architecture.
37

VERSIONS

39       The  asynchronous  I/O system calls first appeared in Linux 2.5, August
40       2002.
41

CONFORMING TO

43       io_submit() is Linux-specific and should not be used in  programs  that
44       are intended to be portable.
45

NOTES

47       Glibc does not provide a wrapper function for this system call.
48
49       The  wrapper  provided  in  libaio  for io_submit() does not follow the
50       usual C library conventions for indicating error: on error it returns a
51       negated  error  number  (the  negative  of  one of the values listed in
52       ERRORS).  If the system call is invoked via syscall(2), then the return
53       value  follows  the usual conventions for indicating an error: -1, with
54       errno set to a (positive) value that indicates the error.
55

SEE ALSO

57       io_cancel(2), io_destroy(2), io_getevents(2), io_setup(2)
58

COLOPHON

60       This page is part of release 3.25 of the Linux  man-pages  project.   A
61       description  of  the project, and information about reporting bugs, can
62       be found at http://www.kernel.org/doc/man-pages/.
63
64
65
66Linux                             2008-06-18                      IO_SUBMIT(2)
Impressum