1 .\" This is _*_ nroff _*_ source. Emacs, gimme all those colors :)
3 .\" Copyright (c) International Business Machines Corp., 2006
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.
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.
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,
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
25 .\" Japanese Version Copyright (c) 2007 Akihiro MOTOKI
26 .\" all rights reserved.
27 .\" Translated 2007-10-23, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
29 .TH SPU_CREATE 2 2007-07-10 "Linux" "Linux Programmer's Manual"
32 .\"O spu_create \- create a new spu context
33 spu_create \- 新しい SPU コンテキストを生成する
37 .B #include <sys/types.h>
38 .B #include <sys/spu.h>
40 .BI "int spu_create(const char *" pathname ", int " flags ", mode_t " mode ");"
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
52 .\"O and returns a file descriptor associated with it.
54 .\"O must point to a non-existing directory in the mount point of the
55 .\"O SPU file system (SPUFS).
57 .\"O .BR spu_create ()
58 .\"O is successful, a directory is created in
60 .\"O and it is populated with the files described in
63 システムコールは、Cell Broadband Engine アーキテクチャを実装した
64 PowerPC マシンにおいて、Synergistic Processor Unit (SPU) にアクセスする
66 このシステムコールは、SPU に対する新しい論理コンテキストを
68 に生成し、そのコンテキストに関連付けられたファイルディスクリプタを返す。
70 は SPU ファイルシステム (SPUFS) のマウントポイント内の
71 存在しないディレクトリを指していなければならない。
75 にディレクトリが生成され、そのディレクトリに
79 .\"O The returned file handler can only be passed to
82 .\"O other operations are not defined on it.
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.
92 論理 SPU コンテキストが破棄されるのは、
93 コンテキスト自身へのファイルディスクリプタがクローズされ、
94 その中のファイルへのファイルディスクリプタが全てクローズされたときである。
95 SPU コンテキストが破棄されると、SPUFS 内のそのディレクトリの全てのエントリ
100 .\"O can be zero or the following
107 .\"O Allow mapping of some of the hardware registers of the SPU into user
109 .\"O This flag requires the
110 .\"O .B CAP_SYS_RAWIO
112 SPU のハードウェアレジスタのいくつかをユーザ空間にマッピングすることを
117 .\"O The new directory and files are created in the SPUFS with the
118 .\"O permissions set by the
120 .\"O argument minus those set in the process's
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 内に新しく生成されたディレクトリとファイルのアクセス許可は、
129 各ファイルの実際のアクセス許可は、そのファイルが読み出しアクセスや
130 書き込みアクセスをサポートしているかも考慮して決まる。
131 .\"O .SH RETURN VALUE
134 .\"O .BR spu_create (2)
135 .\"O returns a new file descriptor.
136 .\"O On error, \-1 is returned and
138 .\"O is set to one of the error codes listed below.
144 に以下のリストに記載のエラーコードのいずれかを設定する。
149 .\"O The current user does not have write access to the SPUFS mount point.
150 現在のユーザが SPUFS のマウントポイントへの書き込み許可を持っていない。
153 .\"O An SPU context already exists in the given path name.
154 指定されたパス名の SPU コンテキストがすでに生成されている。
158 .\"O is not a valid string pointer in the current address space.
160 が現在のアドレス空間で有効な文字列ポインタではない。
164 .\"O is not a directory in the SPUFS mount point.
166 が SPUFS マウントポインタ内のディレクトリではない。
169 .\"O Too many symlinks were found while resolving
172 を解決するまでに辿ったシンボリックリンクが多過ぎた。
175 .\"O The process has reached its maximum open files limit.
176 そのプロセスがオープンできるファイル数の上限に達していた。
185 .\"O The system has reached the global open files limit.
186 システム全体でオープンできるファイル数の上限に達していた。
191 .\"O could not be resolved.
196 .\"O The kernel could not allocate all resources required.
197 カーネルが必要なリソースの全てを割り当てることができなかった。
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 コンテキスト数がそのユーザの特定の上限に達していた。
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
210 機能が動作中のシステムで提供されていない。理由は、
211 ハードウェアで SPU が提供されていないか、
212 spufs モジュールがロードされていないか、のどちらかである。
217 .\"O is not a directory.
223 .\"O must point to a location beneath the mount point of the SPUFS.
224 .\"O By convention, it gets mounted in
227 は SPUFS のマウントポイントの配下の場所を指していなければならない。
234 .\"O .BR spu_create (2)
235 .\"O system call was added to Linux in kernel 2.6.16.
237 システムコールはカーネル 2.6.16 で Linux に追加された。
238 .\"O .SH CONFORMING TO
240 .\"O This call is Linux specific and only implemented by the ppc64
242 .\"O Programs using this system call are not portable.
243 このシステムコールは Linux 固有であり、
244 ppc64 アーキテクチャでのみ実装されている。
245 このシステムコールを使ったプログラムは移植性がない。
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.
255 .\"O .I http://www.bsc.es/projects/deepcomputing/linuxoncell/
256 .\"O for the recommended libraries.
257 glibc はこのシステムコールに対するラッパー関数を提供していない。
261 は より抽象度の高い SPU へのインタフェースを実装するライブラリから
262 利用されることを意図したものであり、通常のアプリケーションから
263 使用は意図されていない。推奨のライブラリについては
264 .I http://www.bsc.es/projects/deepcomputing/linuxoncell/
268 .\"O The code does not yet fully implement all features outlined here.
269 実際のコードではここで述べた全ての機能が完全に実装されているわけではない。
271 .\" Arnd Bergmann <arndb@de.ibm.com>
276 .BR capabilities (7),