OSDN Git Service

(split) Convert release and draft pages to UTF-8.
[linuxjm/LDP_man-pages.git] / draft / man2 / io_getevents.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 .\"WORD:        completion queue        完了キュー
9 .\"
10 .\" .de Sh \" Subsection
11 .\" .br
12 .\" .if t .Sp
13 .\" .ne 5
14 .\" .PP
15 .\" \fB\\$1\fP
16 .\" .PP
17 .\" ..
18 .\" .de Sp \" Vertical space (when we can't use .PP)
19 .\" .if t .sp .5v
20 .\" .if n .sp
21 .\" ..
22 .\" .de Ip \" List item
23 .\" .br
24 .\" .ie \\n(.$>=3 .ne \\$3
25 .\" .el .ne 3
26 .\" .IP "\\$1" \\$2
27 .\" ..
28 .TH IO_GETEVENTS 2 2008-07-04 "Linux" "Linux Programmer's Manual"
29 .\"O .SH NAME
30 .SH 名前
31 .\"O io_getevents \- read asynchronous I/O events from the completion queue
32 io_getevents \- 完了キューから非同期 I/O イベントを読み出す
33 .\"O .SH "SYNOPSIS"
34 .SH 書式
35 .nf
36 .\" .ad l
37 .\" .hy 0
38 .B #include <linux/time.h>
39 .B #include <libaio.h>
40 .\" #include <linux/aio.h>
41 .sp
42 .\" .HP 19
43 .BI "int io_getevents(aio_context_t " ctx_id ", long " min_nr ", long " nr ,
44 .BI "                 struct io_event *" events \
45 ", struct timespec *" timeout );
46 .\" .ad
47 .\" .hy
48 .sp
49 .\"O Link with \fI\-laio\fP.
50 \fI\-laio\fP とリンクする。
51 .fi
52 .\"O .SH "DESCRIPTION"
53 .SH 説明
54 .PP
55 .\"O .BR io_getevents ()
56 .\"O attempts to read at least \fImin_nr\fP events and
57 .\"O up to \fInr\fP events from the completion queue of the AIO context
58 .\"O specified by \fIctx_id\fP.
59 .BR io_getevents ()
60 は、少なくとも \fImin_nr\fP の、最大 \fInr\fP 個の
61 イベントを、 \fIctx_id\fP で指定された AIO (非同期 I/O) コンテキストの
62 完了キューから読み出そうとする。
63 .\"O \fItimeout\fP specifies the amount of time to wait for events,
64 .\"O where a NULL timeout waits until at least \fImin_nr\fP events
65 .\"O have been seen.
66 \fItimeout\fP はイベント読み出しの待ち時間の合計を指定する。
67 タイムアウトに NULL を指定した場合、少なくとも \fImin_nr\fP 個のイベントが
68 読み出されるまで待つことを意味する。
69 .\"O Note that \fItimeout\fP is relative and will be updated if not NULL
70 .\"O and the operation blocks.
71 注意点を以下にあげる:
72 \fItimeout\fP は相対的な指定である。
73 NULL でない場合更新されることもありえる。
74 呼び出し元の動作は停止する。
75 .\"O .SH "RETURN VALUE"
76 .SH 返り値
77 .\"O On success,
78 .\"O .BR io_getevents ()
79 .\"O returns the number of events read: 0 if no events are
80 .\"O available, or less than \fImin_nr\fP if the \fItimeout\fP has elapsed.
81 .\"O For the failure return, see NOTES.
82 成功すると、
83 .BR io_getevents ()
84 は読み出したイベント数を返す。
85 イベントが一つも読み出されなかった場合は 0 が返され、
86 \fItimeout\fP 時間が経過した場合は \fImin_nr\fP 未満の値が返される。
87 失敗時の返り値については、「注意」の節を参照すること。
88 .\"O .SH "ERRORS"
89 .SH エラー
90 .TP
91 .B EFAULT
92 .\"O Either \fIevents\fP or \fItimeout\fP is an invalid pointer.
93 \fIevents\fP または \fItimeout\fP が無効なポインタである。
94 .TP
95 .B EINVAL
96 .\"O \fIctx_id\fP is invalid.
97 .\"O \fImin_nr\fP is out of range or \fInr\fP is
98 .\"O out of range.
99 \fIctx_id\fP が無効である。もしくは、\fImin_nr\fP または \fInr\fP が
100 範囲外の値である。
101 .TP
102 .B EINTR
103 .\"O Interrupted by a signal handler; see
104 .\"O .BR signal (7).
105 シグナルハンドラにより割り込まれた。
106 .BR signal (7)
107 参照。
108 .TP
109 .B ENOSYS
110 .\"O .BR io_getevents ()
111 .\"O is not implemented on this architecture.
112 .BR io_getevents ()
113 がこのアーキテクチャでは実装されていない。
114 .\"O .SH "VERSIONS"
115 .SH バージョン
116 .PP
117 .\"O The asynchronous I/O system calls first appeared in Linux 2.5, August 2002.
118 非同期 I/O システム・コールは 2002年8月に Linux 2.5 で初めて登場した。
119 .\"O .SH "CONFORMING TO"
120 .SH 準拠
121 .PP
122 .\"O .BR io_getevents ()
123 .\"O is Linux-specific and should not be used in
124 .\"O programs that are intended to be portable.
125 .BR io_getevents ()
126 は Linux 固有であり、移植を想定したプログラムで
127 使用すべきではない。
128 .\"O .SH NOTES
129 .SH 注意
130 .\"O Glibc does not provide a wrapper function for this system call.
131 glibc はこのシステムコール用のラッパー関数を提供していない。
132
133 .\"O The wrapper provided in
134 .\"O .I libaio
135 .\"O for
136 .\"O .BR io_getevents ()
137 .\"O does not follow the usual C library conventions for indicating error:
138 .\"O on error it returns a negated error number
139 .\"O (the negative of one of the values listed in ERRORS).
140 .\"O If the system call is invoked via
141 .\"O .BR syscall (2),
142 .\"O then the return value follows the usual conventions for
143 .\"O indicating an error: \-1, with
144 .\"O .I errno
145 .\"O set to a (positive) value that indicates the error.
146 .I libaio
147
148 .BR io_getevents ()
149 用に提供されているラッパー関数は、エラーの通知が通常の C ライブラリの
150 慣習にしたがっておらず、エラーの場合には負のエラー番号
151 (エラーの節に列挙されている値の一つを負にしたもの) が返り値となる。
152 .BR syscall (2)
153 経由でシステムコールを起動すると、返り値は通常のエラー通知の慣習に
154 したがってものとなり、エラーの場合には \-1 が返り、
155 .I errno
156 にエラーを示す (正の) 値が設定される。
157 .\"O .SH "SEE ALSO"
158 .SH 関連項目
159 .PP
160 .BR io_cancel (2),
161 .BR io_destroy (2),
162 .BR io_setup (2),
163 .BR io_submit (2),
164 .BR aio (7),
165 .BR time (7)
166 .\"O .\" .SH "NOTES"
167 .\" .SH 注
168 .\" .PP
169 .\"O .\" The asynchronous I/O system calls were written by Benjamin LaHaise.
170 .\" 非同期 I/O システム・コールは Benjamin LaHaise が書いた。
171 .\"O .\" .SH AUTHOR
172 .\" .SH 著者
173 .\" Kent Yoder.