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 .\" Japanese Version Copyright (c) 2003 Akihiro MOTOKI, all rights reserved.
6 .\" Translated Mon Mar 8 2003 by Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
8 .\" .de Sh \" Subsection
16 .\" .de Sp \" Vertical space (when we can't use .PP)
20 .\" .de Ip \" List item
22 .\" .ie \\n(.$>=3 .ne \\$3
26 .TH IO_SUBMIT 2 2008-06-18 "Linux" "Linux Programmer's Manual"
28 .\"O io_submit \- submit asynchronous I/O blocks for processing
30 io_submit \- ÈóƱ´ü I/O ¥Ö¥í¥Ã¥¯¤ò½èÍýÂÔ¤Á¥¥å¡¼¤ËÅÐÏ¿¤¹¤ë
36 .B #include <libaio.h>
37 .\" #include <linux/aio.h>
40 .BI "int io_submit(aio_context_t " ctx_id ", long " nr \
41 ", struct iocb **" iocbpp );
45 .\"O Link with \fI\-laio\fP.
46 \fI\-laio\fP ¤È¥ê¥ó¥¯¤¹¤ë¡£
48 .\"O .SH "DESCRIPTION"
52 .\"O queues \fInr\fP I/O request blocks for processing in
53 .\"O the AIO context \fIctx_id\fP.
54 .\"O \fIiocbpp\fP should be an array of \fInr\fP AIO control blocks,
55 .\"O which will be submitted to context \fIctx_id\fP.
57 ¤Ï¡¢AIO ¥³¥ó¥Æ¥¥¹¥È \fIctx_id\fP ¤Ë \fInr\fP ¸Ä¤Î I/O
58 ¥ê¥¯¥¨¥¹¥È¤ò½èÍýÂÔ¤Á¤È¤·¤Æ¥¥å¡¼¤ËÄɲ乤롣
59 \fIiocbpp\fP ¤Ï¡¢AIO ¥³¥ó¥Æ¥¥¹¥È \fIctx_id\fP ¤ËÅÐÏ¿¤µ¤ì¤ë \fInr\fP ¸Ä¤Î
60 AIO À©¸æ¥Ö¥í¥Ã¥¯¤ÎÇÛÎó¤Ë¤Ê¤Ã¤Æ¤¤¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤¡£
61 .\"O .SH "RETURN VALUE"
65 .\"O returns the number of \fIiocb\fPs submitted (which may be
66 .\"O 0 if \fInr\fP is zero).
67 .\"O For the failure return, see NOTES.
70 ¤ÏÅÐÏ¿¤·¤¿ \fIiocb\fP ¤Î¸Ä¿ô¤òÊÖ¤¹
71 (\fInr\fP ¤¬ 0 ¤Î¾ì¹ç¤Ï 0 ¤òÊÖ¤¹)¡£
72 ¼ºÇÔ»þ¤ÎÊÖ¤êÃͤˤĤ¤¤Æ¤Ï¡¢¡ÖÃí°Õ¡×¤ÎÀá¤ò»²¾È¤¹¤ë¤³¤È¡£
77 .\"O Insufficient resources are available to queue any \fIiocb\fPs.
78 ²¿¸Ä¤«¤Î \fIiocb\fP ¤ò¥¥å¡¼¤ËÆþ¤ì¤ë¤Î¤ËɬÍפʥ꥽¡¼¥¹¤¬ÆÀ¤é¤ì¤Ê¤¤¡£
81 .\"O The file descriptor specified in the first \fIiocb\fP is invalid.
82 ÀèƬ¤Î \fIiocb\fP ¤Ë»ØÄꤵ¤ì¤¿¥Õ¥¡¥¤¥ë¡¦¥Ç¥£¥¹¥¯¥ê¥×¥¿¤¬Ìµ¸ú¤Ç¤¢¤ë¡£
85 .\"O One of the data structures points to invalid data.
86 ¥Ç¡¼¥¿¹½Â¤¤ÎÃæ¤Ë̵¸ú¤Ê¥Ç¡¼¥¿¤ò»Ø¤·¤Æ¤¤¤ë¤â¤Î¤¬¤¢¤ë¡£
89 .\"O The \fIaio_context\fP specified by \fIctx_id\fP is invalid.
90 .\"O \fInr\fP is less than 0.
91 .\"O The \fIiocb\fP at *iocbpp[0] is not properly initialized,
92 .\"O or the operation specified is invalid for the file descriptor
93 .\"O in the \fIiocb\fP.
94 \fIctx_id\fP ¤Ç»ØÄꤵ¤ì¤¿ \fIaio_context\fP ¤¬Ìµ¸ú¤Ç¤¢¤ë¡£
95 \fInr\fP ¤¬ 0 ̤Ëþ¤Ç¤¢¤ë¡£
96 *iocbpp[0] ¤Î \fIiocb\fP ¤¬Å¬Àڤ˽é´ü²½¤µ¤ì¤Æ¤¤¤Ê¤¤¤«¡¢
97 »ØÄꤵ¤ì¤¿Áàºî¤¬¤½¤Î \fIiocb\fP Ãæ¤Î¥Õ¥¡¥¤¥ë¡¦¥Ç¥£¥¹¥¯¥ê¥×¥¿¤ËÂФ·¤Æ
101 .\"O .BR io_submit ()
102 .\"O is not implemented on this architecture.
104 ¤Ï¤³¤Î¥¢¡¼¥¥Æ¥¯¥Á¥ã¤Ç¤Ï¼ÂÁõ¤µ¤ì¤Æ¤¤¤Ê¤¤¡£
108 .\"O The asynchronous I/O system calls first appeared in Linux 2.5, August 2002.
109 ÈóƱ´ü I/O ¥·¥¹¥Æ¥à¡¦¥³¡¼¥ë¤Ï 2002ǯ8·î¤Ë Linux 2.5 ¤Ç½é¤á¤ÆÅо줷¤¿¡£
110 .\"O .SH "CONFORMING TO"
113 .\"O .BR io_submit ()
114 .\"O is Linux-specific and should not be used in
115 .\"O programs that are intended to be portable.
117 ¤Ï Linux ¸ÇͤǤ¢¤ê¡¢°Ü¿¢¤òÁÛÄꤷ¤¿¥×¥í¥°¥é¥à¤Ç
121 .\"O Glibc does not provide a wrapper function for this system call.
122 glibc ¤Ï¤³¤Î¥·¥¹¥Æ¥à¥³¡¼¥ëÍѤΥé¥Ã¥Ñ¡¼´Ø¿ô¤òÄ󶡤·¤Æ¤¤¤Ê¤¤¡£
124 .\"O The wrapper provided in
127 .\"O .BR io_submit ()
128 .\"O does not follow the usual C library conventions for indicating error:
129 .\"O on error it returns a negated error number
130 .\"O (the negative of one of the values listed in ERRORS).
131 .\"O If the system call is invoked via
132 .\"O .BR syscall (2),
133 .\"O then the return value follows the usual conventions for
134 .\"O indicating an error: \-1, with
136 .\"O set to a (positive) value that indicates the error.
140 ÍѤËÄ󶡤µ¤ì¤Æ¤¤¤ë¥é¥Ã¥Ñ¡¼´Ø¿ô¤Ï¡¢¥¨¥é¡¼¤ÎÄÌÃΤ¬Ä̾ï¤Î C ¥é¥¤¥Ö¥é¥ê¤Î
141 ´·½¬¤Ë¤·¤¿¤¬¤Ã¤Æ¤ª¤é¤º¡¢¥¨¥é¡¼¤Î¾ì¹ç¤Ë¤ÏÉé¤Î¥¨¥é¡¼ÈÖ¹æ
142 (¥¨¥é¡¼¤ÎÀá¤ËÎóµó¤µ¤ì¤Æ¤¤¤ëÃͤΰì¤Ä¤òÉé¤Ë¤·¤¿¤â¤Î) ¤¬ÊÖ¤êÃͤȤʤ롣
144 ·Ðͳ¤Ç¥·¥¹¥Æ¥à¥³¡¼¥ë¤òµ¯Æ°¤¹¤ë¤È¡¢ÊÖ¤êÃͤÏÄ̾ï¤Î¥¨¥é¡¼ÄÌÃΤδ·½¬¤Ë
145 ¤·¤¿¤¬¤Ã¤Æ¤â¤Î¤È¤Ê¤ê¡¢¥¨¥é¡¼¤Î¾ì¹ç¤Ë¤Ï \-1 ¤¬Ê֤ꡢ
147 ¤Ë¥¨¥é¡¼¤ò¼¨¤¹ (Àµ¤Î) Ãͤ¬ÀßÄꤵ¤ì¤ë¡£
152 .BR io_getevents (2),
157 .\"O .\" The asynchronous I/O system calls were written by Benjamin LaHaise.
158 .\" ÈóƱ´ü I/O ¥·¥¹¥Æ¥à¡¦¥³¡¼¥ë¤Ï Benjamin LaHaise ¤¬½ñ¤¤¤¿¡£