OSDN Git Service

(split) LDP: Translation snapshots for ja.po.
[linuxjm/LDP_man-pages.git] / draft / man2 / spu_create.2
1 .\" This is _*_ nroff _*_ source. Emacs, gimme all those colors :)
2 .\"
3 .\" Copyright (c) International Business Machines Corp., 2006
4 .\"
5 .\" This program is free software; you can redistribute it and/or
6 .\" modify it under the terms of the GNU General Public License as
7 .\" published by the Free Software Foundation; either version 2 of
8 .\" the License, or (at your option) any later version.
9 .\"
10 .\" This program is distributed in the hope that it will be useful,
11 .\" but WITHOUT ANY WARRANTY; without even the implied warranty of
12 .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
13 .\" the GNU General Public License for more details.
14 .\"
15 .\" You should have received a copy of the GNU General Public License
16 .\" along with this program; if not, write to the Free Software
17 .\" Foundation, Inc., 59 Temple Place, Suite 330, Boston,
18 .\" MA 02111-1307 USA
19 .\"
20 .\" HISTORY:
21 .\" 2005-09-28, created by Arnd Bergmann <arndb@de.ibm.com>
22 .\" 2006-06-16, revised by Eduardo M. Fleury <efleury@br.ibm.com>
23 .\" 2007-07-10, some polishing by mtk
24 .\"
25 .\" Japanese Version Copyright (c) 2007  Akihiro MOTOKI
26 .\"         all rights reserved.
27 .\" Translated 2007-10-23, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
28 .\"
29 .TH SPU_CREATE 2 2007-07-10 "Linux" "Linux Programmer's Manual"
30 .\"O .SH NAME
31 .SH 名前
32 .\"O spu_create \- create a new spu context
33 spu_create \- 新しい SPU コンテキストを生成する
34 .\"O .SH SYNOPSIS
35 .SH 書式
36 .nf
37 .B #include <sys/types.h>
38 .B #include <sys/spu.h>
39
40 .BI "int spu_create(const char *" pathname ", int " flags ", mode_t " mode ");"
41 .fi
42 .\"O .SH DESCRIPTION
43 .SH 説明
44 .\"O The
45 .\"O .BR spu_create ()
46 .\"O system call is used on PowerPC machines that implement the
47 .\"O Cell Broadband Engine Architecture in order to access Synergistic
48 .\"O Processor Units (SPUs).
49 .\"O It creates a new logical context for an
50 .\"O SPU in
51 .\"O .I pathname
52 .\"O and returns a file descriptor associated with it.
53 .\"O .I pathname
54 .\"O must point to a non-existing directory in the mount point of the
55 .\"O SPU file system (SPUFS).
56 .\"O If
57 .\"O .BR spu_create ()
58 .\"O is successful, a directory is created in
59 .\"O .I pathname
60 .\"O and it is populated with the files described in
61 .\"O .BR spufs (7).
62 .BR spu_create ()
63 システムコールは、Cell Broadband Engine アーキテクチャを実装した
64 PowerPC マシンにおいて、Synergistic Processor Unit (SPU) にアクセスする
65 ために使用される。
66 このシステムコールは、SPU に対する新しい論理コンテキストを
67 .I pathname
68 に生成し、そのコンテキストに関連付けられたファイルディスクリプタを返す。
69 .I pathname
70 は SPU ファイルシステム (SPUFS) のマウントポイント内の
71 存在しないディレクトリを指していなければならない。
72 .BR spu_create ()
73 が成功すると、
74 .I pathname
75 にディレクトリが生成され、そのディレクトリに
76 .BR spufs (7)
77 で説明されているファイル群が配置される。
78
79 .\"O The returned file handler can only be passed to
80 .\"O .BR spu_run (2)
81 .\"O or closed;
82 .\"O other operations are not defined on it.
83 .\"O A logical SPU
84 .\"O context is destroyed when its file descriptor is closed as well as
85 .\"O all the file descriptors pointing to files inside it.
86 .\"O When an SPU context is destroyed all its directory entries in the
87 .\"O SPUFS are removed.
88 返されたファイルハンドラは、
89 .BR spu_run (2)
90 に渡すか、クローズするかしかできない。
91 他の操作は定義されていない。
92 論理 SPU コンテキストが破棄されるのは、
93 コンテキスト自身へのファイルディスクリプタがクローズされ、
94 その中のファイルへのファイルディスクリプタが全てクローズされたときである。
95 SPU コンテキストが破棄されると、SPUFS 内のそのディレクトリの全てのエントリ
96 が削除される。
97
98 .\"O The argument
99 .\"O .I flags
100 .\"O can be zero or the following
101 .\"O constant:
102 引き数
103 .I flags
104 にはゼロか以下の定数を指定できる。
105 .TP
106 .B SPU_RAWIO
107 .\"O Allow mapping of some of the hardware registers of the SPU into user
108 .\"O space.
109 .\"O This flag requires the
110 .\"O .B CAP_SYS_RAWIO
111 .\"O capability.
112 SPU のハードウェアレジスタのいくつかをユーザ空間にマッピングすることを
113 許可する。このフラグを指定するには
114 .B CAP_SYS_RAWIO
115 ケーパビリティが必要である。
116 .PP
117 .\"O The new directory and files are created in the SPUFS with the
118 .\"O permissions set by the
119 .\"O .I mode
120 .\"O argument minus those set in the process's
121 .\"O .BR umask (2).
122 .\"O The actual permissions set for each file also depend on whether the
123 .\"O file supports read and/or write accesses.
124 SPUFS 内に新しく生成されたディレクトリとファイルのアクセス許可は、
125 .I mode
126 引き数からそのプロセスの
127 .BR umask (2)
128 を引いた値に設定される。
129 各ファイルの実際のアクセス許可は、そのファイルが読み出しアクセスや
130 書き込みアクセスをサポートしているかも考慮して決まる。
131 .\"O .SH RETURN VALUE
132 .SH 返り値
133 .\"O On success,
134 .\"O .BR spu_create (2)
135 .\"O returns a new file descriptor.
136 .\"O On error, \-1 is returned and
137 .\"O .I errno
138 .\"O is set to one of the error codes listed below.
139 成功すると、
140 .BR spu_create (2)
141 は新しいファイルディスクリプタを返す。
142 エラーの場合、\-1 を返し、
143 .I errno
144 に以下のリストに記載のエラーコードのいずれかを設定する。
145 .\"O .SH ERRORS
146 .SH エラー
147 .TP
148 .B EACCES
149 .\"O The current user does not have write access to the SPUFS mount point.
150 現在のユーザが SPUFS のマウントポイントへの書き込み許可を持っていない。
151 .TP
152 .B EEXIST
153 .\"O An SPU context already exists in the given path name.
154 指定されたパス名の SPU コンテキストがすでに生成されている。
155 .TP
156 .B EFAULT
157 .\"O .I pathname
158 .\"O is not a valid string pointer in the current address space.
159 .I pathname
160 が現在のアドレス空間で有効な文字列ポインタではない。
161 .TP
162 .B EINVAL
163 .\"O .I pathname
164 .\"O is not a directory in the SPUFS mount point.
165 .I pathname
166 が SPUFS マウントポインタ内のディレクトリではない。
167 .TP
168 .B ELOOP
169 .\"O Too many symlinks were found while resolving
170 .\"O .IR pathname .
171 .I pathname
172 を解決するまでに辿ったシンボリックリンクが多過ぎた。
173 .TP
174 .B EMFILE
175 .\"O The process has reached its maximum open files limit.
176 そのプロセスがオープンできるファイル数の上限に達していた。
177 .TP
178 .B ENAMETOOLONG
179 .\"O .I pathname
180 .\"O is too long.
181 .I pathname
182 が長過ぎる。
183 .TP
184 .B ENFILE
185 .\"O The system has reached the global open files limit.
186 システム全体でオープンできるファイル数の上限に達していた。
187 .TP
188 .B ENOENT
189 .\"O Part of
190 .\"O .I pathname
191 .\"O could not be resolved.
192 .I pathname
193 の一部が解決できなかった。
194 .TP
195 .B ENOMEM
196 .\"O The kernel could not allocate all resources required.
197 カーネルが必要なリソースの全てを割り当てることができなかった。
198 .TP
199 .B ENOSPC
200 .\"O There are not enough SPU resources available to create
201 .\"O a new context or the user specific limit for the number
202 .\"O of SPU contexts has been reached.
203 新しいコンテキストを生成するのに十分な SPU リソースがなかった、
204 または SPU コンテキスト数がそのユーザの特定の上限に達していた。
205 .TP
206 .B ENOSYS
207 .\"O The functionality is not provided by the current system, because
208 .\"O either the hardware does not provide SPUs or the spufs module is not
209 .\"O loaded.
210 機能が動作中のシステムで提供されていない。理由は、
211 ハードウェアで SPU が提供されていないか、
212 spufs モジュールがロードされていないか、のどちらかである。
213 .TP
214 .B ENOTDIR
215 .\"O A part of
216 .\"O .I pathname
217 .\"O is not a directory.
218 .I pathname
219 の一部がディレクトリではない。
220 .\"O .SH FILES
221 .SH ファイル
222 .\"O .I pathname
223 .\"O must point to a location beneath the mount point of the SPUFS.
224 .\"O By convention, it gets mounted in
225 .\"O .IR /spu .
226 .I pathname
227 は SPUFS のマウントポイントの配下の場所を指していなければならない。
228 慣例では、SPUFS は
229 .I /spu
230 にマウントされる。
231 .\"O .SH VERSIONS
232 .SH バージョン
233 .\"O The
234 .\"O .BR spu_create (2)
235 .\"O system call was added to Linux in kernel 2.6.16.
236 .BR spu_create (2)
237 システムコールはカーネル 2.6.16 で Linux に追加された。
238 .\"O .SH CONFORMING TO
239 .SH 準拠
240 .\"O This call is Linux specific and only implemented by the ppc64
241 .\"O architecture.
242 .\"O Programs using this system call are not portable.
243 このシステムコールは Linux 固有であり、
244 ppc64 アーキテクチャでのみ実装されている。
245 このシステムコールを使ったプログラムは移植性がない。
246 .\"O .SH NOTES
247 .SH 注意
248 .\"O Glibc does not provide a wrapper for this system call; call it using
249 .\"O .BR syscall (2).
250 .\"O Note however, that
251 .\"O .BR spu_create ()
252 .\"O is meant to be used from libraries that implement a more abstract
253 .\"O interface to SPUs, not to be used from regular applications.
254 .\"O See
255 .\"O .I http://www.bsc.es/projects/deepcomputing/linuxoncell/
256 .\"O for the recommended libraries.
257 glibc はこのシステムコールに対するラッパー関数を提供していない。
258 .BR syscall (2)
259 を使うこと。ただし、
260 .BR spu_create ()
261 は より抽象度の高い SPU へのインタフェースを実装するライブラリから
262 利用されることを意図したものであり、通常のアプリケーションから
263 使用は意図されていない。推奨のライブラリについては
264 .I http://www.bsc.es/projects/deepcomputing/linuxoncell/
265 を参照のこと。
266 .\"O .SH BUGS
267 .SH バグ
268 .\"O The code does not yet fully implement all features outlined here.
269 実際のコードではここで述べた全ての機能が完全に実装されているわけではない。
270 .\" .SH AUTHOR
271 .\" Arnd Bergmann <arndb@de.ibm.com>
272 .\"O .SH SEE ALSO
273 .SH 関連項目
274 .BR close (2),
275 .BR spu_run (2),
276 .BR capabilities (7),
277 .BR spufs (7)