OSDN Git Service

(split) Import translated manuals from JM CVS Repository.
[linuxjm/LDP_man-pages.git] / draft / man2 / io_submit.2
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.
4 .\"
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>
7 .\"
8 .\" .de Sh \" Subsection
9 .\" .br
10 .\" .if t .Sp
11 .\" .ne 5
12 .\" .PP
13 .\" \fB\\$1\fP
14 .\" .PP
15 .\" ..
16 .\" .de Sp \" Vertical space (when we can't use .PP)
17 .\" .if t .sp .5v
18 .\" .if n .sp
19 .\" ..
20 .\" .de Ip \" List item
21 .\" .br
22 .\" .ie \\n(.$>=3 .ne \\$3
23 .\" .el .ne 3
24 .\" .IP "\\$1" \\$2
25 .\" ..
26 .TH IO_SUBMIT 2 2008-06-18 "Linux" "Linux Programmer's Manual"
27 .\"O .SH NAME
28 .\"O io_submit \- submit asynchronous I/O blocks for processing
29 .SH Ì¾Á°
30 io_submit \- ÈóƱ´ü I/O ¥Ö¥í¥Ã¥¯¤ò½èÍýÂÔ¤Á¥­¥å¡¼¤ËÅÐÏ¿¤¹¤ë
31 .\"O .SH "SYNOPSIS"
32 .SH ½ñ¼°
33 .nf
34 .\" .ad l
35 .\" .hy 0
36 .B #include <libaio.h>
37 .\" #include <linux/aio.h>
38 .sp
39 .\" .HP 16
40 .BI "int io_submit(aio_context_t " ctx_id ", long " nr \
41 ", struct iocb **" iocbpp );
42 .\" .ad
43 .\" .hy
44 .sp
45 .\"O Link with \fI\-laio\fP.
46 \fI\-laio\fP ¤È¥ê¥ó¥¯¤¹¤ë¡£
47 .fi
48 .\"O .SH "DESCRIPTION"
49 .SH ÀâÌÀ
50 .PP
51 .\"O .BR io_submit ()
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.
56 .BR io_submit ()
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"
62 .SH ÊÖ¤êÃÍ
63 .\"O On success,
64 .\"O .BR io_submit ()
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.
68 À®¸ù¤¹¤ë¤È¡¢
69 .BR io_submit ()
70 ¤ÏÅÐÏ¿¤·¤¿ \fIiocb\fP ¤Î¸Ä¿ô¤òÊÖ¤¹
71 (\fInr\fP ¤¬ 0 ¤Î¾ì¹ç¤Ï 0 ¤òÊÖ¤¹)¡£
72 ¼ºÇÔ»þ¤ÎÊÖ¤êÃͤˤĤ¤¤Æ¤Ï¡¢¡ÖÃí°Õ¡×¤ÎÀá¤ò»²¾È¤¹¤ë¤³¤È¡£
73 .\"O .SH "ERRORS"
74 .SH ¥¨¥é¡¼
75 .TP
76 .B EAGAIN
77 .\"O Insufficient resources are available to queue any \fIiocb\fPs.
78 ²¿¸Ä¤«¤Î \fIiocb\fP ¤ò¥­¥å¡¼¤ËÆþ¤ì¤ë¤Î¤ËɬÍפʥ꥽¡¼¥¹¤¬ÆÀ¤é¤ì¤Ê¤¤¡£
79 .TP
80 .B EBADF
81 .\"O The file descriptor specified in the first \fIiocb\fP is invalid.
82 ÀèƬ¤Î \fIiocb\fP ¤Ë»ØÄꤵ¤ì¤¿¥Õ¥¡¥¤¥ë¡¦¥Ç¥£¥¹¥¯¥ê¥×¥¿¤¬Ìµ¸ú¤Ç¤¢¤ë¡£
83 .TP
84 .B EFAULT
85 .\"O One of the data structures points to invalid data.
86 ¥Ç¡¼¥¿¹½Â¤¤ÎÃæ¤Ë̵¸ú¤Ê¥Ç¡¼¥¿¤ò»Ø¤·¤Æ¤¤¤ë¤â¤Î¤¬¤¢¤ë¡£
87 .TP
88 .B EINVAL
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 Ãæ¤Î¥Õ¥¡¥¤¥ë¡¦¥Ç¥£¥¹¥¯¥ê¥×¥¿¤ËÂФ·¤Æ
98 ̵¸ú¤Ç¤¢¤ë¡£
99 .TP
100 .B ENOSYS
101 .\"O .BR io_submit ()
102 .\"O is not implemented on this architecture.
103 .BR io_submit ()
104 ¤Ï¤³¤Î¥¢¡¼¥­¥Æ¥¯¥Á¥ã¤Ç¤Ï¼ÂÁõ¤µ¤ì¤Æ¤¤¤Ê¤¤¡£
105 .\"O .SH "VERSIONS"
106 .SH ¥Ð¡¼¥¸¥ç¥ó
107 .PP
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"
111 .SH ½àµò
112 .PP
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.
116 .BR io_submit ()
117 ¤Ï Linux ¸ÇÍ­¤Ç¤¢¤ê¡¢°Ü¿¢¤òÁÛÄꤷ¤¿¥×¥í¥°¥é¥à¤Ç
118 »ÈÍѤ¹¤Ù¤­¤Ç¤Ï¤Ê¤¤¡£
119 .\"O .SH NOTES
120 .SH Ãí°Õ
121 .\"O Glibc does not provide a wrapper function for this system call.
122 glibc ¤Ï¤³¤Î¥·¥¹¥Æ¥à¥³¡¼¥ëÍѤΥé¥Ã¥Ñ¡¼´Ø¿ô¤òÄ󶡤·¤Æ¤¤¤Ê¤¤¡£
123
124 .\"O The wrapper provided in
125 .\"O .I libaio
126 .\"O for
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
135 .\"O .I errno
136 .\"O set to a (positive) value that indicates the error.
137 .I libaio
138 ¤Ç
139 .BR io_submit ()
140 ÍѤËÄ󶡤µ¤ì¤Æ¤¤¤ë¥é¥Ã¥Ñ¡¼´Ø¿ô¤Ï¡¢¥¨¥é¡¼¤ÎÄÌÃΤ¬Ä̾ï¤Î C ¥é¥¤¥Ö¥é¥ê¤Î
141 ´·½¬¤Ë¤·¤¿¤¬¤Ã¤Æ¤ª¤é¤º¡¢¥¨¥é¡¼¤Î¾ì¹ç¤Ë¤ÏÉé¤Î¥¨¥é¡¼ÈÖ¹æ
142 (¥¨¥é¡¼¤ÎÀá¤ËÎóµó¤µ¤ì¤Æ¤¤¤ëÃͤΰì¤Ä¤òÉé¤Ë¤·¤¿¤â¤Î) ¤¬ÊÖ¤êÃͤȤʤ롣
143 .BR syscall (2)
144 ·Ðͳ¤Ç¥·¥¹¥Æ¥à¥³¡¼¥ë¤òµ¯Æ°¤¹¤ë¤È¡¢ÊÖ¤êÃͤÏÄ̾ï¤Î¥¨¥é¡¼ÄÌÃΤδ·½¬¤Ë
145 ¤·¤¿¤¬¤Ã¤Æ¤â¤Î¤È¤Ê¤ê¡¢¥¨¥é¡¼¤Î¾ì¹ç¤Ë¤Ï \-1 ¤¬Ê֤ꡢ
146 .I errno
147 ¤Ë¥¨¥é¡¼¤ò¼¨¤¹ (Àµ¤Î) Ãͤ¬ÀßÄꤵ¤ì¤ë¡£
148 .\"O .SH "SEE ALSO"
149 .SH ´ØÏ¢¹àÌÜ
150 .BR io_cancel (2),
151 .BR io_destroy (2),
152 .BR io_getevents (2),
153 .BR io_setup (2)
154 .\"O .\" .SH "NOTES"
155 .\" .SH Ãí
156 .\" .PP
157 .\"O .\" The asynchronous I/O system calls were written by Benjamin LaHaise.
158 .\" ÈóƱ´ü I/O ¥·¥¹¥Æ¥à¡¦¥³¡¼¥ë¤Ï Benjamin LaHaise ¤¬½ñ¤¤¤¿¡£
159 .\"O .\" .SH AUTHOR
160 .\" .SH Ãø¼Ô
161 .\" Kent Yoder.