OSDN Git Service

Convert release and draft pages to UTF-8.
[linuxjm/jm.git] / manual / LDP_man-pages / 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 .BR aio (7)
155 .\"O .\" .SH "NOTES"
156 .\" .SH 注
157 .\" .PP
158 .\"O .\" The asynchronous I/O system calls were written by Benjamin LaHaise.
159 .\" 非同期 I/O システム・コールは Benjamin LaHaise が書いた。
160 .\"O .\" .SH AUTHOR
161 .\" .SH 著者
162 .\" Kent Yoder.