OSDN Git Service

Convert release and draft pages to UTF-8.
[linuxjm/jm.git] / manual / LDP_man-pages / draft / man2 / io_setup.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_SETUP 2 2003-06-18 "Linux" "Linux Programmer's Manual"
27 .\"O .SH NAME
28 .\"O io_setup \- create an asynchronous I/O context
29 .SH 名前
30 io_setup \- 非同期 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 15
40 .BI "int io_setup(unsigned " nr_events ", aio_context_t *" ctxp );
41 .\" .ad
42 .\" .hy
43 .sp
44 .\"O Link with \fI\-laio\fP.
45 \fI\-laio\fP とリンクする。
46 .fi
47 .\"O .SH "DESCRIPTION"
48 .SH 説明
49 .PP
50 .\"O .BR io_setup ()
51 .\"O creates an asynchronous I/O context capable of receiving
52 .\"O at least \fInr_events\fP.
53 .BR io_setup ()
54 は、少なくとも \fInr_events\fP 個のイベントを受信可能な
55 非同期 I/O (AIO) コンテキストの作成を行う。
56 .\"O \fIctxp\fP must not point to an AIO context that already exists, and must
57 .\"O be initialized to 0 prior to the call.
58 \fIctxp\fP は、すでに存在する AIO コンテキストを指していてはならず、
59 .BR io_setup ()
60 の呼び出しの前に 0 に初期化されていなければならない。
61 .\"O On successful creation of the AIO context, \fI*ctxp\fP is filled in
62 .\"O with the resulting handle.
63 AIO コンテキストの作成に成功すると、\fI*ctxp\fP に作成された
64 AIO コンテキストへのポインタがセットされる。
65 .\"O .SH "RETURN VALUE"
66 .SH 返り値
67 .\"O On success,
68 .\"O .BR io_setup ()
69 .\"O returns 0.
70 .\"O For the failure return, see NOTES.
71 成功した場合、
72 .BR io_setup ()
73 は 0 を返す。
74 失敗時の返り値については、「注意」の節を参照すること。
75 .\"O .SH "ERRORS"
76 .SH エラー
77 .TP
78 .B EAGAIN
79 .\"O The specified \fInr_events\fP exceeds the user's limit of available events.
80 指定された \fInr_events\fP がユーザが使用できるイベント数の上限を越えている。
81 .TP
82 .B EFAULT
83 .\"O An invalid pointer is passed for \fIctxp\fP.
84 \fIctxp\fP に無効なポインタが指定されている。
85 .TP
86 .B EINVAL
87 .\"O \fIctxp\fP is not initialized, or the specified \fInr_events\fP
88 .\"O exceeds internal limits.
89 .\"O \fInr_events\fP should be greater than 0.
90 \fIctxp\fP が初期化されていないか、指定された \fInr_events\fP が
91 内部の制限値を越えている。また、 \fInr_events\fP は 0 より大きい値に
92 設定すべきである。
93 .TP
94 .B ENOMEM
95 .\"O Insufficient kernel resources are available.
96 必要なカーネル・リソースを得られない。
97 .TP
98 .B ENOSYS
99 .\"O .BR io_setup ()
100 .\"O is not implemented on this architecture.
101 .BR io_setup ()
102 がこのアーキテクチャでは実装されていない。
103 .\"O .SH "VERSIONS"
104 .SH バージョン
105 .PP
106 .\"O The asynchronous I/O system calls first appeared in Linux 2.5, August 2002.
107 非同期 I/O システム・コールは 2002年8月に Linux 2.5 で初めて登場した。
108 .\"O .SH "CONFORMING TO"
109 .SH 準拠
110 .PP
111 .\"O .BR io_setup ()
112 .\"O is Linux-specific and should not be used in programs
113 .\"O that are intended to be portable.
114 .BR io_setup ()
115 は Linux 固有であり、移植を想定したプログラムで
116 使用すべきではない。
117 .\"O .SH NOTES
118 .SH 注意
119 .\"O Glibc does not provide a wrapper function for this system call.
120 glibc はこのシステムコール用のラッパー関数を提供していない。
121
122 .\"O The wrapper provided in
123 .\"O .I libaio
124 .\"O for
125 .\"O .BR io_setup ()
126 .\"O does not follow the usual C library conventions for indicating error:
127 .\"O on error it returns a negated error number
128 .\"O (the negative of one of the values listed in ERRORS).
129 .\"O If the system call is invoked via
130 .\"O .BR syscall (2),
131 .\"O then the return value follows the usual conventions for
132 .\"O indicating an error: \-1, with
133 .\"O .I errno
134 .\"O set to a (positive) value that indicates the error.
135 .I libaio
136
137 .BR io_setup ()
138 用に提供されているラッパー関数は、エラーの通知が通常の C ライブラリの
139 慣習にしたがっておらず、エラーの場合には負のエラー番号
140 (エラーの節に列挙されている値の一つを負にしたもの) が返り値となる。
141 .BR syscall (2)
142 経由でシステムコールを起動すると、返り値は通常のエラー通知の慣習に
143 したがってものとなり、エラーの場合には \-1 が返り、
144 .I errno
145 にエラーを示す (正の) 値が設定される。
146 .\"O .SH "SEE ALSO"
147 .SH 関連項目
148 .PP
149 .BR io_cancel (2),
150 .BR io_destroy (2),
151 .BR io_getevents (2),
152 .BR io_submit (2),
153 .BR aio (7)
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.