OSDN Git Service

(split) Add translated date for some pages.
[linuxjm/LDP_man-pages.git] / draft / man7 / spufs.7
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 .\"   Mark Nutter <mnutter@us.ibm.com> and
23 .\"   Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
24 .\" 2006-06-16, revised by Eduardo M. Fleury <efleury@br.ibm.com>
25 .\" 2007-07-10, quite a lot of polishing by mtk
26 .\"
27 .\" Japanese Version Copyright (c) 2007  Akihiro MOTOKI
28 .\"         all rights reserved.
29 .\" Translated 2007-10-23, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
30 .\"
31 .TH SPUFS 7 2007-07-10 "Linux" "Linux Programmer's Manual"
32 .\"O .SH NAME
33 .SH Ì¾Á°
34 .\"O spufs \- the SPU file system
35 spufs \- SPU ¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥à
36 .\"O .SH DESCRIPTION
37 .SH ÀâÌÀ
38 .\"O The SPU file system is used on PowerPC machines that implement the
39 .\"O Cell Broadband Engine Architecture in order to access Synergistic
40 .\"O Processor Units (SPUs).
41 SPU ¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥à¤Ï¡¢Cell Broadband Engine ¥¢¡¼¥­¥Æ¥¯¥Á¥ã¤ò¼ÂÁõ¤·¤¿
42 PowerPC ¥Þ¥·¥ó¤Ë¤ª¤¤¤Æ¡¢Synergistic Processor Unit (SPU) ¤Ë¥¢¥¯¥»¥¹¤¹¤ë
43 ¤¿¤á¤Ë»ÈÍѤµ¤ì¤ë¡£
44
45 .\"O The file system provides a name space similar to POSIX shared
46 .\"O memory or message queues.
47 .\"O Users that have write permissions
48 .\"O on the file system can use
49 .\"O .BR spu_create (2)
50 .\"O to establish SPU contexts under the spufs root directory.
51 ¤³¤Î¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥à¤Ç¤Ï¡¢POSIX ¶¦Í­¥á¥â¥ê¤ä¥á¥Ã¥»¡¼¥¸¥­¥å¡¼¤Ë
52 »÷¤¿Ì¾Á°¶õ´Ö¤¬Ä󶡤µ¤ì¤ë¡£
53 ¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥à¤Ë½ñ¤­¹þ¤ßµö²Ä¤ò»ý¤Ä¥æ¡¼¥¶¤Ï
54 .BR spu_create (2)
55 ¤ò»È¤Ã¤Æ spufs ¤Î¥ë¡¼¥È¥Ç¥£¥ì¥¯¥È¥ê¤Ë SPU ¥³¥ó¥Æ¥­¥¹¥È¤òºîÀ®¤Ç¤­¤ë¡£
56
57 .\"O Every SPU context is represented by a directory containing
58 .\"O a predefined set of files.
59 .\"O These files can be
60 .\"O used for manipulating the state of the logical SPU.
61 .\"O Users can change permissions on those files, but can't
62 .\"O add or remove files.
63 ³Æ SPU ¥³¥ó¥Æ¥­¥¹¥È¤Ï¡¢¤¢¤é¤«¤¸¤áÄêµÁ¤µ¤ì¤¿¥Õ¥¡¥¤¥ë·²¤ò´Þ¤à
64 ¥Ç¥£¥ì¥¯¥È¥ê¤È¤·¤Æɽ¸½¤µ¤ì¤ë¡£
65 ¤³¤ì¤é¤Î¥Õ¥¡¥¤¥ë¤ò»È¤Ã¤Æ¡¢ÏÀÍý SPU ¤Î¾õÂÖ¤òÁàºî¤Ç¤­¤ë¡£
66 ¥æ¡¼¥¶¤Ï¤³¤ì¤é¤Î¥Õ¥¡¥¤¥ë¤Î¥¢¥¯¥»¥¹µö²Ä¤òÊѹ¹¤¹¤ë¤³¤È¤Ï¤Ç¤­¤ë¤¬¡¢
67 ¥Õ¥¡¥¤¥ë¤ÎÄɲᦺï½ü¤ò¹Ô¤¦¤³¤È¤Ï¤Ç¤­¤Ê¤¤¡£
68 .\"O .SS Mount Options
69 .SS ¥Þ¥¦¥ó¥È¥ª¥×¥·¥ç¥ó
70 .TP
71 .B uid=<uid>
72 .\"O set the user owning the mount point; the default is 0 (root).
73 ¥Þ¥¦¥ó¥È¥Ý¥¤¥ó¥È¤ò½êÍ­¤¹¤ë¥æ¡¼¥¶¤òÀßÄꤹ¤ë¡£
74 ¥Ç¥Õ¥©¥ë¥È¤Ï 0 (root) ¤Ç¤¢¤ë¡£
75 .TP
76 .B gid=<gid>
77 .\"O set the group owning the mount point; the default is 0 (root).
78 ¥Þ¥¦¥ó¥È¥Ý¥¤¥ó¥È¤ò½êÍ­¤¹¤ë¥°¥ë¡¼¥×¤òÀßÄꤹ¤ë¡£
79 ¥Ç¥Õ¥©¥ë¥È¤Ï 0 (root) ¤Ç¤¢¤ë¡£
80 .\"O .SS Files
81 .SS ¥Õ¥¡¥¤¥ë
82 .\"O The files in
83 .\"O .I spufs
84 .\"O mostly follow the standard behavior for regular system calls like
85 .\"O .BR read (2)
86 .\"O or
87 .\"O .BR write (2),
88 .\"O but often support only a subset of the operations
89 .\"O supported on regular file systems.
90 .\"O This list details the supported
91 .\"O operations and the deviations from the standard behavior described
92 .\"O in the respective man pages.
93 .I spufs
94 ¤Î¥Õ¥¡¥¤¥ë¤Ï¡¢¤Û¤È¤ó¤É¤Î¾ì¹ç
95 .BR read (2)
96 ¤ä
97 .BR write (2)
98 ¤È¤¤¤Ã¤¿Ä̾ï¤Î¥·¥¹¥Æ¥à¥³¡¼¥ë¤ËÂФ¹¤ëɸ½àŪ¤Ê¿¶¤ëÉñ¤¤¤ò¼¨¤¹¤¬¡¢
99 ¿¤¯¤Î¾ì¹çÄ̾ï¤Î¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥à¤Ç¥µ¥Ý¡¼¥È¤µ¤ì¤Æ¤¤¤ëÁàºî¤Î°ìÉôʬ¤À¤±¤¬
100 ¥µ¥Ý¡¼¥È¤µ¤ì¤Æ¤¤¤ë¡£°Ê²¼¤Î¥ê¥¹¥È¤Ç¤Ï¡¢¥µ¥Ý¡¼¥È¤µ¤ì¤Æ¤¤¤ëÁàºî¤È
101 ¤½¤ì¤¾¤ì¤Î¥Þ¥Ë¥å¥¢¥ë¥Ú¡¼¥¸¤Ë½ñ¤«¤ì¤Æ¤¤¤ëɸ½àŪ¤Ê¿¶¤ëÉñ¤¤¤È¤Î°ã¤¤¤Ë
102 ¤Ä¤¤¤ÆÀâÌÀ¤¹¤ë¡£
103
104 .\"O All files that support the
105 .\"O .BR read (2)
106 .\"O operation also support
107 .\"O .BR readv (2)
108 .\"O and all files that support the
109 .\"O .BR write (2)
110 .\"O operation also support
111 .\"O .BR writev (2).
112 .BR read (2)
113 Áàºî¤ËÂбþ¤·¤Æ¤¤¤ëÁ´¤Æ¤Î¥Õ¥¡¥¤¥ë¤Ï
114 .BR readv (2)
115 ¤Ë¤âÂбþ¤·¤Æ¤¤¤ë¡£¤Þ¤¿¡¢
116 .BR write (2)
117 Áàºî¤ËÂбþ¤·¤Æ¤¤¤ëÁ´¤Æ¤Î¥Õ¥¡¥¤¥ë¤Ï
118 .BR writev (2)
119 ¤Ë¤âÂбþ¤·¤Æ¤¤¤ë¡£
120
121 .\"O All files support the
122 .\"O .BR access (2)
123 .\"O and
124 .\"O .BR stat (2)
125 .\"O family of operations, but for the latter call,
126 .\"O the only fields of the returned
127 .\"O .I stat
128 .\"O structure that contain reliable information are
129 .\"O .IR st_mode ,
130 .\"O .IR st_nlink ,
131 .\"O .IR st_uid ,
132 .\"O and
133 .\"O .IR st_gid .
134 Á´¤Æ¤Î¥Õ¥¡¥¤¥ë¤Ï¡¢
135 .BR access (2)
136 ¤È
137 .BR stat (2)
138 ·Ï¤ÎÁàºî¤ËÂбþ¤·¤Æ¤¤¤ë¤¬¡¢
139 .BR stat (2)
140 ¤Ç¤Ï¡¢¸Æ¤Ó½Ð¤·¤¿ºÝ¤ËÊÖ¤µ¤ì¤ë
141 .I stat
142 ¹½Â¤ÂΤΥե£¡¼¥ë¥É¤Î¤¦¤Á¿®Íê¤Ç¤­¤ë¾ðÊó¤¬Æþ¤Ã¤Æ¤¤¤ë¤Î¤Ï
143 .IR st_mode ,
144 .IR st_nlink ,
145 .IR st_uid ,
146 .I st_gid
147 ¤À¤±¤Ç¤¢¤ë¡£
148
149 .\"O All files support the
150 .\"O .BR chmod (2)/ fchmod (2)
151 .\"O and
152 .\"O .BR chown (2)/ fchown (2)
153 .\"O operations, but will not be able to grant permissions that contradict
154 .\"O the possible operations (e.g., read access on the
155 .\"O .I wbox
156 .\"O file).
157 Á´¤Æ¤Î¥Õ¥¡¥¤¥ë¤Ï
158 .BR chmod (2)/ fchmod (2)
159 ¤È
160 .BR chown (2)/ fchown (2)
161 ¤ÎÁàºî¤ËÂбþ¤·¤Æ¤¤¤ë¤¬¡¢
162 ¤½¤Î¥Õ¥¡¥¤¥ë¤¬Âбþ¤·¤Æ¤¤¤ëÁàºî¤ÈÌ·½â¤¹¤ë¥¢¥¯¥»¥¹µö²Ä¤ò
163 ÉÕÍ¿¤¹¤ë¤³¤È¤Ï¤Ç¤­¤Ê¤¤ (Î㤨¤Ð¡¢
164 .I wbox
165 ¥Õ¥¡¥¤¥ë¤ËÂФ¹¤ëÆɤ߽Ф·¥¢¥¯¥»¥¹¤Ê¤É)¡£
166
167 .\"O The current set of files is:
168 ¸½»þÅÀ¤Ç¤Î¥Õ¥¡¥¤¥ë¤Ï°Ê²¼¤ÎÄ̤ê¤Ç¤¢¤ë¡£
169 .TP
170 .B /mem
171 .\"O the contents of the local storage memory of the SPU.
172 .\"O This can be accessed like a regular shared memory
173 .\"O file and contains both code and data in the address
174 .\"O space of the SPU.
175 .\"O The possible operations on an open
176 .\"O .I mem
177 .\"O file are:
178 SPU ¤Î¥í¡¼¥«¥ë¥¹¥È¥ì¡¼¥¸¤ÎÆâÍÆ¡£
179 ¤³¤Î¥Õ¥¡¥¤¥ë¤ÏÄ̾ï¤Î¶¦Í­¥á¥â¥ê¥Õ¥¡¥¤¥ë¤ÈƱÍͤ˥¢¥¯¥»¥¹¤Ç¤­¡¢
180 SPU ¤Î¥¢¥É¥ì¥¹¶õ´Ö¤Ë¤Ï¥³¡¼¥É¤È¥Ç¡¼¥¿¤ÎξÊý¤ò³ÊǼ¤Ç¤­¤ë¡£
181 ¥ª¡¼¥×¥ó¤µ¤ì¤¿
182 .I mem
183 ¥Õ¥¡¥¤¥ë¤Ë²Äǽ¤ÊÁàºî¤Ï°Ê²¼¤Ç¤¢¤ë¡£
184 .RS
185 .TP
186 .BR read "(2), " pread "(2), " write "(2), " pwrite "(2), " lseek (2)
187 .\"O These operate as usual, with the exception that
188 .\"O .BR lseek "(2), " write (2)
189 .\"O and
190 .\"O .BR pwrite (2)
191 .\"O are not supported beyond the end of the file.
192 .\"O The file size
193 .\"O is the size of the local storage of the SPU,
194 .\"O which is normally 256 kilobytes.
195 ¤³¤ì¤é¤ÏÄ̾ïÄ̤êÆ°ºî¤¹¤ë¤¬¡¢
196 ¥Õ¥¡¥¤¥ëËöÈø¤ò±Û¤¨¤Æ¤Î
197 .BR lseek (2),
198 .BR write (2),
199 .BR pwrite (2)
200 ¤ËÂбþ¤·¤Æ¤¤¤Ê¤¤ÅÀ¤À¤±¤¬°Û¤Ê¤ë¡£
201 ¥Õ¥¡¥¤¥ë¥µ¥¤¥º¤Ï SPU ¤Î¥í¡¼¥«¥ë¥¹¥È¥ì¡¼¥¸¤Î¥µ¥¤¥º¤Ç¤¢¤ê¡¢
202 Ä̾ï¤Ï 256 ¥­¥í¥Ð¥¤¥È¤Ç¤¢¤ë¡£
203 .TP
204 .BR mmap (2)
205 .\"O Mapping
206 .\"O .I mem
207 .\"O into the process address space provides access to the SPU local
208 .\"O storage within the process address space.
209 .\"O Only
210 .\"O .B MAP_SHARED
211 .\"O mappings are allowed.
212 .I mem
213 ¤ò¥×¥í¥»¥¹¤Î¥¢¥É¥ì¥¹¶õ´Ö¤Ë¥Þ¥Ã¥Ô¥ó¥°¤¹¤ë¤È¡¢
214 ¥×¥í¥»¥¹¤Î¥¢¥É¥ì¥¹¶õ´Ö¤Î°ìÉô¤È¤·¤Æ
215 SPU ¤Î¥í¡¼¥«¥ë¡¦¥¹¥È¥ì¡¼¥¸¤Ë¥¢¥¯¥»¥¹¤Ç¤­¤ë¤è¤¦¤Ë¤Ê¤ë¡£
216 .RE
217 .TP
218 .B /mbox
219 .\"O The first SPU-to-CPU communication mailbox.
220 .\"O This file
221 .\"O is read-only and can be read in units of 32 bits.
222 .\"O The file can only be used in non-blocking mode and not
223 .\"O even
224 .\"O .BR poll (2)
225 .\"O will block on it.
226 .\"O The only possible operation on an open
227 .\"O .I mbox
228 .\"O file is:
229 SPU ¤«¤é CPU ¤Ø¤ÎÄÌ¿®ÍѤΰì¤ÄÌܤΥ᡼¥ë¥Ü¥Ã¥¯¥¹¡£
230 ¤³¤Î¥Õ¥¡¥¤¥ë¤ÏÆɤ߽Ф·ÀìÍѤǡ¢Æɤ߽Ф·¤Ï 32¥Ó¥Ã¥Èñ°Ì¤Ç¹Ô¤¦¡£
231 ¤³¤Î¥Õ¥¡¥¤¥ë¤ÏÈóÄä»ß (non-blocking) ¥â¡¼¥É¤Ç¤Î¤ß»ÈÍѤǤ­¡¢
232 .BR poll (2)
233 ¤Ç¤¢¤Ã¤Æ¤â¤³¤Î¥Õ¥¡¥¤¥ë¤ÇÄä»ß (block) ¤¹¤ë¤³¤È¤Ï¤Ê¤¤¡£
234 ¥ª¡¼¥×¥ó¤µ¤ì¤¿
235 .I mbox
236 ¥Õ¥¡¥¤¥ë¤Ë²Äǽ¤ÊÁàºî¤Ï°Ê²¼¤Ç¤¢¤ë¡£
237 .RS
238 .TP
239 .BR read (2)
240 .\"O If
241 .\"O .I count
242 .\"O is smaller than four,
243 .\"O .BR read (2)
244 .\"O returns \-1 and sets
245 .\"O .I errno
246 .\"O to
247 .\"O .BR EINVAL .
248 .\"O If there is no data available in the mailbox, the return
249 .\"O value is set to \-1 and
250 .\"O .I errno
251 .\"O is set to
252 .\"O .BR EAGAIN .
253 .\"O When data
254 .\"O has been read successfully, four bytes are placed in
255 .\"O the data buffer and the value four is returned.
256 .I count
257 ¤¬ 4 ¤è¤ê¾®¤µ¤¤¾ì¹ç¡¢
258 .BR read (2)
259 ¤Ï \-1 ¤òÊÖ¤·¡¢
260 .I errno
261 ¤ò
262 .B EINVAL
263 ¤ËÀßÄꤹ¤ë¡£
264 ¥á¡¼¥ë¥Ü¥Ã¥¯¥¹¤Ë¥Ç¡¼¥¿¤¬¤Ê¤¤¾ì¹ç¡¢\-1 ¤¬Ê֤ꡢ
265 .I errno
266 ¤¬
267 .B EAGAIN
268 ¤ËÀßÄꤵ¤ì¤ë¡£¥Ç¡¼¥¿¤ÎÆɤ߽Ф·¤ËÀ®¸ù¤·¤¿¾ì¹ç¡¢
269 4 ¥Ð¥¤¥È¤¬¥Ç¡¼¥¿¥Ð¥Ã¥Õ¥¡¤Ë³ÊǼ¤µ¤ì¡¢ÊÖ¤êÃͤȤ·¤Æ 4 ¤¬ÊÖ¤µ¤ì¤ë¡£
270 .RE
271 .TP
272 .B /ibox
273 .\"O The second SPU-to-CPU communication mailbox.
274 .\"O This file is similar to the first mailbox file, but can be read
275 .\"O in blocking I/O mode, thus
276 .\"O .BR poll (2)
277 .\"O and similar system calls can be used to monitor this file.
278 .\"O The possible operations on an open
279 .\"O .I ibox
280 .\"O file are:
281 SPU ¤«¤é CPU ¤Ø¤ÎÄÌ¿®ÍѤÎÆó¤ÄÌܤΥ᡼¥ë¥Ü¥Ã¥¯¥¹¤Ç¤¢¤ë¡£
282 ¤³¤Î¥Õ¥¡¥¤¥ë¤Ï°ì¤ÄÌܤΥ᡼¥ë¥Ü¥Ã¥¯¥¹¥Õ¥¡¥¤¥ë¤È»÷¤Æ¤¤¤ë¤¬¡¢
283 Ää»ß (blocking) I/O ¥â¡¼¥É¤Ç¤ÎÆɤ߽Ф·¤¬²Äǽ¤Ç¤¢¤ë¡£¤·¤¿¤¬¤Ã¤Æ¡¢
284 .BR poll (2)
285 ¤äƱÍͤΥ·¥¹¥Æ¥à¥³¡¼¥ë¤ò»È¤Ã¤Æ¡¢¤³¤Î¥Õ¥¡¥¤¥ë¤ò´Æ»ë¤¹¤ë¤³¤È¤¬¤Ç¤­¤ë¡£
286 ¥ª¡¼¥×¥ó¤µ¤ì¤¿
287 .I ibox
288 ¥Õ¥¡¥¤¥ë¤Ë²Äǽ¤ÊÁàºî¤Ï°Ê²¼¤Ç¤¢¤ë¡£
289 .RS
290 .TP
291 .BR read (2)
292 .\"O If
293 .\"O .I count
294 .\"O is smaller than four,
295 .\"O .BR read (2)
296 .\"O returns \-1 and sets
297 .\"O .I errno
298 .\"O to
299 .\"O .BR EINVAL .
300 .\"O If there is no data available in the mailbox and the file
301 .\"O descriptor has been opened with
302 .\"O .BR O_NONBLOCK ,
303 .\"O the return value is set to \-1 and
304 .\"O .I errno
305 .\"O is set to
306 .\"O .BR EAGAIN .
307 .I count
308 ¤¬ 4 ¤è¤ê¾®¤µ¤¤¾ì¹ç¡¢
309 .BR read (2)
310 ¤Ï \-1 ¤òÊÖ¤·¡¢
311 .I errno
312 ¤ò
313 .B EINVAL
314 ¤ËÀßÄꤹ¤ë¡£
315 ¥á¡¼¥ë¥Ü¥Ã¥¯¥¹¤Ë¥Ç¡¼¥¿¤¬¤Ê¤¤¾ì¹ç¡¢¥Õ¥¡¥¤¥ë¥Ç¥£¥¹¥¯¥ê¥×¥¿¤¬
316 .B O_NONBLOCK
317 ¤Ç¥ª¡¼¥×¥ó¤µ¤ì¤Æ¤¤¤ì¤Ð¡¢ÊÖ¤êÃͤϠ\-1 ¤È¤Ê¤ê¡¢
318 .I errno
319 ¤Ï
320 .B EAGAIN
321 ¤ËÀßÄꤵ¤ì¤ë¡£
322
323 .\"O If there is no data available in the mailbox and the file
324 .\"O descriptor has been opened without
325 .\"O .BR O_NONBLOCK ,
326 .\"O the call will
327 .\"O block until the SPU writes to its interrupt mailbox channel.
328 .\"O When data has been read successfully, four bytes are placed in
329 .\"O the data buffer and the value four is returned.
330 ¥á¡¼¥ë¥Ü¥Ã¥¯¥¹¤Ë¥Ç¡¼¥¿¤¬¤Ê¤¤¾ì¹ç¤Ç¡¢¥Õ¥¡¥¤¥ë¥Ç¥£¥¹¥¯¥ê¥×¥¿¤¬
331 .B O_NONBLOCK
332 ¤Ê¤·¤Ç¥ª¡¼¥×¥ó¤µ¤ì¤Æ¤¤¤ì¤Ð¡¢
333 SPU ¤¬¼«Ê¬¤Î³ä¤ê¹þ¤ß¥á¡¼¥ë¥Ü¥Ã¥¯¥¹¥Á¥ã¥Í¥ë (interrupt mailbox channel)
334 ¤Ë½ñ¤­¹þ¤ß¤ò¹Ô¤¦¤Þ¤Ç
335 .BR read (2)
336 ¤ÏÄä»ß (block) ¤¹¤ë¡£
337 ¥Ç¡¼¥¿¤ÎÆɤ߽Ф·¤ËÀ®¸ù¤·¤¿¾ì¹ç¡¢
338 4 ¥Ð¥¤¥È¤¬¥Ç¡¼¥¿¥Ð¥Ã¥Õ¥¡¤Ë³ÊǼ¤µ¤ì¡¢ÊÖ¤êÃͤȤ·¤Æ 4 ¤¬ÊÖ¤µ¤ì¤ë¡£
339 .TP
340 .BR poll (2)
341 .\"O Poll on the
342 .\"O .I ibox
343 .\"O file returns
344 .\"O .I "(POLLIN | POLLRDNORM)"
345 .\"O whenever data is available for reading.
346 .I ibox
347 ¥Õ¥¡¥¤¥ë¤ËÂФ¹¤ë
348 .BR poll (2)
349 ¤Ï¡¢Æɤ߽Ф·¥Ç¡¼¥¿¤¬ÍøÍѲÄǽ¤Ë¤Ê¤ëÅÙ¤Ë
350 .I "(POLLIN | POLLRDNORM)"
351 ¤òÊÖ¤¹¡£
352 .RE
353 .TP
354 .B /wbox
355 .\"O The CPU-to-SPU communication mailbox.
356 .\"O It is write-only and can be written in units of 32 bits.
357 .\"O If the mailbox is full,
358 .\"O .BR write (2)
359 .\"O will block and
360 .\"O .BR poll (2)
361 .\"O can be used to wait for it to become empty again.
362 .\"O The possible operations on an open
363 .\"O .I wbox
364 .\"O file are:
365 CPU ¤«¤é SPU ¤Ø¤ÎÄÌ¿®ÍѤΥ᡼¥ë¥Ü¥Ã¥¯¥¹¡£
366 ¤³¤Î¥Õ¥¡¥¤¥ë¤Ï½ñ¤­¹þ¤ßÀìÍѤǡ¢½ñ¤­¹þ¤ß¤Ï 32¥Ó¥Ã¥Èñ°Ì¤Ç¹Ô¤¦¡£
367 ¥á¡¼¥ë¥Ü¥Ã¥¯¥¹¤¬°ìÇդξì¹ç¡¢
368 .BR write (2)
369 ¤ÏÄä»ß (block) ¤·¡¢
370 .BR poll (2)
371 ¤ò»È¤Ã¤Æ¥á¡¼¥ë¥Ü¥Ã¥¯¥¹¤ËºÆÅÙ¶õ¤­¤¬¤Ç¤­¤ë¤Þ¤ÇÂԤĤ³¤È¤¬¤Ç¤­¤ë¡£
372 ¥ª¡¼¥×¥ó¤µ¤ì¤¿
373 .I wbox
374 ¥Õ¥¡¥¤¥ë¤Ë²Äǽ¤ÊÁàºî¤Ï°Ê²¼¤Ç¤¢¤ë¡£
375 .RS
376 .TP
377 .BR write (2)
378 .\"O If
379 .\"O .I count
380 .\"O is smaller than four,
381 .\"O .BR write (2)
382 .\"O returns \-1 and sets
383 .\"O .I errno
384 .\"O to
385 .\"O .BR EINVAL .
386 .\"O If there is no space available in the mailbox and the file
387 .\"O descriptor has been opened with
388 .\"O .BR O_NONBLOCK ,
389 .\"O the return
390 .\"O value is set to \-1 and
391 .\"O .I errno
392 .\"O is set to
393 .\"O .BR EAGAIN .
394 .I count
395 ¤¬ 4 ¤è¤ê¾®¤µ¤¤¾ì¹ç¡¢
396 .BR write (2)
397 ¤Ï \-1 ¤òÊÖ¤·¡¢
398 .I errno
399 ¤ò
400 .B EINVAL
401 ¤ËÀßÄꤹ¤ë¡£
402 ¥á¡¼¥ë¥Ü¥Ã¥¯¥¹¤Ë¶õ¤­Îΰ褬¤Ê¤¤¾ì¹ç¡¢¥Õ¥¡¥¤¥ë¥Ç¥£¥¹¥¯¥ê¥×¥¿¤¬
403 .B O_NONBLOCK
404 ¤Ç¥ª¡¼¥×¥ó¤µ¤ì¤Æ¤¤¤ì¤Ð¡¢ÊÖ¤êÃͤϠ\-1 ¤È¤Ê¤ê¡¢
405 .I errno
406 ¤Ï
407 .B EAGAIN
408 ¤ËÀßÄꤵ¤ì¤ë¡£
409
410 .\"O If there is no space available in the mailbox and the file
411 .\"O descriptor has been opened without
412 .\"O .BR O_NONBLOCK ,
413 .\"O the call will
414 .\"O block until the SPU reads from its PPE mailbox channel.
415 .\"O When data has been written successfully,
416 .\"O the system call returns four as its function result.
417 ¥á¡¼¥ë¥Ü¥Ã¥¯¥¹¤Ë¶õ¤­Îΰ褬¤Ê¤¤¾ì¹ç¤Ç¡¢¥Õ¥¡¥¤¥ë¥Ç¥£¥¹¥¯¥ê¥×¥¿¤¬
418 .B O_NONBLOCK
419 ¤Ê¤·¤Ç¥ª¡¼¥×¥ó¤µ¤ì¤Æ¤¤¤ì¤Ð¡¢
420 SPU ¤¬¼«Ê¬¤Î PPE ¥á¡¼¥ë¥Ü¥Ã¥¯¥¹¥Á¥ã¥Í¥ë¤«¤éÆɤ߽Ф·¤ò¹Ô¤¦¤Þ¤Ç
421 .BR write (2)
422 ¤ÏÄä»ß (block) ¤¹¤ë¡£
423 ¥Ç¡¼¥¿¤Î½ñ¤­¹þ¤ß¤ËÀ®¸ù¤·¤¿¾ì¹ç¡¢ÊÖ¤êÃͤȤ·¤Æ 4 ¤¬ÊÖ¤µ¤ì¤ë¡£
424 .TP
425 .BR poll (2)
426 .\"O A poll on the
427 .\"O .I wbox
428 .\"O file returns
429 .\"O .I "(POLLOUT | POLLWRNORM)"
430 .\"O whenever space is available for writing.
431 .I wbox
432 ¥Õ¥¡¥¤¥ë¤ËÂФ¹¤ë
433 .BR poll (2)
434 ¤Ï¡¢½ñ¤­¹þ¤ßÍѤζõ´Ö¤¬ÍøÍѲÄǽ¤Ë¤Ê¤ëÅÙ¤Ë
435 .I "(POLLOUT | POLLWRNORM)"
436 ¤òÊÖ¤¹¡£
437 .RE
438 .TP
439 .BR /mbox_stat ", " /ibox_stat ", " /wbox_stat
440 .\"O These are read-only files that contain the length of the current
441 .\"O queue of each mailbox, i.e., how many words can be read from
442 .\"O .IR mbox " or " ibox
443 .\"O or how many words can be written to
444 .\"O .I wbox
445 .\"O without blocking.
446 .\"O The files can be read only in four-byte units and return
447 .\"O a big-endian binary integer number.
448 .\"O The possible operations on an open
449 .\"O .I *box_stat
450 .\"O file are:
451 ¤³¤ì¤é¤Î¥Õ¥¡¥¤¥ë¤ÏÆɤ߽Ф·ÀìÍѤǡ¢
452 ³Æ¥á¡¼¥ë¥Ü¥Ã¥¯¥¹¤Î¸½ºß¤Î¥­¥å¡¼Ä¹¤òÊÝ»ý¤¹¤ë¡£
453 ¶ñÂÎŪ¤Ë¤Ï¡¢Ää»ß (blocking) ¤»¤º¤Ë¡¢
454 .IR mbox " ¤ä " ibox
455 ¤«¤é²¿¥ï¡¼¥É¤òÆɤ߽Ф¹¤³¤È¤¬¤Ç¤­¡¢
456 .I wbox
457 ¤Ë²¿¥ï¡¼¥É¤ò½ñ¤­¹þ¤à¤³¤È¤¬¤Ç¤­¤ë¤«¡¢¤È¤¤¤¦¤³¤È¤Ç¤¢¤ë¡£
458 ¤³¤ì¤é¤Î¥Õ¥¡¥¤¥ë¤Ï 4 ¥Ð¥¤¥Èñ°Ì¤Ç¤Î¤ßÆɤ߽Ф·¤¬²Äǽ¤Ç¡¢
459 ¥Ó¥Ã¥°¡¦¥¨¥ó¥Ç¥£¥¢¥ó¤ÎÀ°¿ôÃͤòÊÖ¤¹¡£
460 ¥ª¡¼¥×¥ó¤µ¤ì¤¿
461 .I *box_stat
462 ¥Õ¥¡¥¤¥ë¤Ë²Äǽ¤ÊÁàºî¤Ï°Ê²¼¤Ç¤¢¤ë¡£
463 .RS
464 .TP
465 .BR read (2)
466 .\"O If
467 .\"O .I count
468 .\"O is smaller than four,
469 .\"O .BR read (2)
470 .\"O returns \-1 and sets
471 .\"O .I errno
472 .\"O to
473 .\"O .BR EINVAL .
474 .\"O Otherwise, a four-byte value is placed in the data buffer.
475 .\"O This value is the number of elements that can be read from (for
476 .\"O .I mbox_stat
477 .\"O and
478 .\"O .IR ibox_stat )
479 .\"O or written to (for
480 .\"O .IR wbox_stat )
481 .\"O the respective mailbox without blocking or getting an
482 .\"O .B EAGAIN
483 .\"O error.
484 .I count
485 ¤¬ 4 ¤è¤ê¾®¤µ¤¤¾ì¹ç¡¢
486 .BR read (2)
487 ¤Ï \-1 ¤òÊÖ¤·¡¢
488 .I errno
489 ¤ò
490 .B EINVAL
491 ¤ËÀßÄꤹ¤ë¡£
492 ¤½¤ì°Ê³°¤Î¾ì¹ç¡¢¥Ç¡¼¥¿¥Ð¥Ã¥Õ¥¡¤Ë 4 ¥Ð¥¤¥È¤ÎÃͤ¬½ñ¤­¹þ¤Þ¤ì¤ë¡£
493 ¤³¤ÎÃͤϡ¢³Æ¥á¡¼¥ë¥Ü¥Ã¥¯¥¹¤Ë¤ª¤¤¤ÆÄä»ß¤»¤º¤Ë¡¢¤Þ¤¿¤Ï
494 .B EAGAIN
495 ¥¨¥é¡¼¤Ê¤·¤Ç¡¢Æɤ߽Ф·²Äǽ¤Ê¥¨¥ì¥á¥ó¥È¿ô
496 .RI ( mbox_stat
497 ¤ä
498 .I ibox_stat
499 ¤Î¾ì¹ç)¡¢½ñ¤­¹þ¤ß²Äǽ¤Ê¥¨¥ì¥á¥ó¥È¿ô
500 .RI ( wbox_stat
501 ¤Î¾ì¹ç) ¤Ç¤¢¤ë¡£
502 .RE
503 .TP
504 .BR /npc ", " /decr ", " /decr_status ", " /spu_tag_mask ", " \
505 /event_mask ", " /srr0
506 .\"O These files expose internal registers of the SPU.
507 .\"O The values are represented
508 .\"O as ASCII strings containing the numeric value of each register.
509 .\"O These can be used in read/write mode for debugging, but normal
510 .\"O operation of programs should not rely on these files because
511 .\"O accesses to any of them except
512 .\"O .I npc
513 .\"O require an SPU context save, which is very inefficient.
514 ¤³¤ì¤é¤Î¥Õ¥¡¥¤¥ë¤Ï SPU ¤ÎÆâÉô¥ì¥¸¥¹¥¿¤ò¸ø³«¤¹¤ë¤â¤Î¤Ç¤¢¤ë¡£
515 Ãͤϡ¢³Æ¥ì¥¸¥¹¥¿¤Î¿ôÃͤò´Þ¤à¥¢¥¹¥­¡¼Ê¸»úÎó¤Çɽ¸½¤µ¤ì¤ë¡£
516 ¤³¤ì¤é¤Î¥Õ¥¡¥¤¥ë¤Ï¥Ç¥Ð¥Ã¥°ÍѤȤ·¤ÆÆɤ߽Ф·/½ñ¤­¹þ¤ß¤Îξ¥â¡¼¥É¤ÇÍøÍѤǤ­¤ë¤¬¡¢
517 ¥×¥í¥°¥é¥à¤ÎÄ̾ï¤ÎÁàºî¤Ï¤³¤ì¤é¤Î¥Õ¥¡¥¤¥ë¤Ë°Í¸¤¹¤Ù¤­¤Ç¤Ï¤Ê¤¤¡£
518 ¤Ê¤¼¤Ê¤é¡¢¤³¤ì¤é¤Î¥Õ¥¡¥¤¥ë¤Î¤¦¤Á
519 .I npc
520 °Ê³°¤Ø¤Î¥¢¥¯¥»¥¹¤Ç¤Ï SPU ¥³¥ó¥Æ¥­¥¹¥È¤ÎÊݸ¤¬É¬¿Ü¤Ç¤¢¤ê¡¢
521 SPU ¥³¥ó¥Æ¥­¥¹¥È¤ÎÊݸ¤ÏÈó¾ï¤Ë¸úΨ¤¬°­¤¤¤«¤é¤Ç¤¢¤ë¡£
522 .IP
523 .\"O The contents of these files are:
524 ¤³¤ì¤é¤Î¥Õ¥¡¥¤¥ë¤ÎÆâÍƤϰʲ¼¤ÎÄ̤ꡣ
525 .RS
526 .TP 16
527 .I npc
528 .\"O Next Program Counter
529 ¼¡¤Î¥×¥í¥°¥é¥à¥«¥¦¥ó¥¿
530 .TP
531 .I decr
532 .\"O SPU Decrementer
533 SPU Decrementer
534 .TP
535 .I decr_status
536 .\"O Decrementer Status
537 Decrementer ¤Î¾õÂÖ
538 .TP
539 .I spu_tag_mask
540 .\"O MFC tag mask for SPU DMA
541 SPU ¤Î DMA ÍѤΠMFA ¥¿¥°¥Þ¥¹¥¯
542 .TP
543 .I event_mask
544 .\"O Event mask for SPU interrupts
545 SPU ¤Î³ä¤ê¹þ¤ß¤Î¥¤¥Ù¥ó¥È¥Þ¥¹¥¯
546 .TP
547 .I srr0
548 .\"O Interrupt Return address register
549 ³ä¤ê¹þ¤ß¥ê¥¿¡¼¥ó¥¢¥É¥ì¥¹¥ì¥¸¥¹¥¿
550 .RE
551 .IP
552 .\"O The possible operations on one of these files are:
553 ¤³¤ì¤é¤Î¥Õ¥¡¥¤¥ë¤ËÂФ·¤Æ²Äǽ¤ÊÁàºî¤Ï°Ê²¼¤Ç¤¢¤ë¡£
554 .RS
555 .TP
556 .BR read (2)
557 .\"O When the
558 .\"O .I count
559 .\"O supplied to the
560 .\"O .BR read (2)
561 .\"O call is shorter than the required length for the register
562 .\"O value plus a newline character, subsequent reads from the same
563 .\"O file descriptor will complete the string, regardless
564 .\"O of changes to the register by a running SPU task.
565 .\"O When a complete string has been read, all subsequent read operations
566 .\"O will return zero bytes and a new file descriptor needs to be opened
567 .\"O to read a new value.
568 .BR read (2)
569 ¤ËÅϤµ¤ì¤¿
570 .I count
571 ¤¬¥ì¥¸¥¹¥¿ÃͤȲþ¹Ô (newline) Ê¸»ú 1 ¸Ä¤ò³ÊǼ¤¹¤ë¤Î¤ËɬÍפÊŤµ¤è¤êû¤¤¾ì¹ç¡¢
572 Ʊ¤¸¥Õ¥¡¥¤¥ë¥Ç¥£¥¹¥¯¥ê¥×¥¿¤ò³¤±¤Æ read ¤¹¤ë¤³¤È¤Ç¡¢Ê¸»úÎóÁ´ÂΤòÆɤ߽Ф¹¤³¤È
573 ¤¬¤Ç¤­¤ë¡£¤³¤ÎºÝ¡¢¼Â¹ÔÃæ¤Î SPU ¥¿¥¹¥¯¤Ë¤è¤ê¥ì¥¸¥¹¥¿ÃͤÎÊѹ¹¤Î±Æ¶Á¤Ï¼õ¤±¤Ê¤¤¡£
574 ʸ»úÎóÁ´ÂΤ¬Æɤ߽Фµ¤ì¤ë¤È¡¢¤½¤ì°Ê¹ß¤Î read Áàºî¤Ç¤Ï 0 ¥Ð¥¤¥È¤¬ÊÖ¤µ¤ì¡¢
575 ¿·¤·¤¤ÃͤòÆɤ߽Ф¹¤Ë¤Ï¿·¤·¤¤¥Õ¥¡¥¤¥ë¥Ç¥£¥¹¥¯¥ê¥×¥¿¤ò¥ª¡¼¥×¥ó¤¹¤ëɬÍפ¬¤¢¤ë¡£
576 .TP
577 .BR write (2)
578 .\"O A
579 .\"O .BR write (2)
580 .\"O operation on the file sets the register to the
581 .\"O value given in the string.
582 .\"O The string is parsed from the beginning
583 .\"O until the first non-numeric character or the end of the buffer.
584 .\"O Subsequent writes to the same file descriptor overwrite the
585 .\"O previous setting.
586 ¤³¤Î¥Õ¥¡¥¤¥ë¤Ø¤Î
587 .BR write (2)
588 Áàºî¤Ï¥ì¥¸¥¹¥¿Ãͤòʸ»úÎó¤Ç»ØÄꤵ¤ì¤¿ÃͤËÀßÄꤹ¤ë¡£
589 ʸ»úÎó¤Î²ò¼á¤ÏÀèƬ¤«¤é³«»Ï¤µ¤ì¡¢¿ô»ú°Ê³°¤Îʸ»ú¤¬½é¤á¤ÆÅо줹¤ë¤«¡¢
590 ¥Ð¥Ã¥Õ¥¡¤ÎËöÈø¤Ë㤹¤ë¤Þ¤Ç¹Ô¤ï¤ì¤ë¡£
591 Ʊ¤¸¥Õ¥¡¥¤¥ë¥Ç¥£¥¹¥¯¥ê¥×¥¿¤Ø³¤±¤Æ write ¤ò¹Ô¤¦¤È¡¢
592 ¸å¤Î write ¤Ë¤è¤êÁ°¤ÎÀßÄ꤬¾å½ñ¤­¤µ¤ì¤ë¡£
593 .RE
594 .TP
595 .B /fpcr
596 .\"O This file provides access to the Floating Point Status and
597 .\"O Control Register as a four-byte file.
598 .\"O The operations on the
599 .\"O .I fpcr
600 .\"O file are:
601 ¤³¤Î¥Õ¥¡¥¤¥ë¤Ë¤è¤ê Floating Point Status and Control Register ¤Ë
602 ¥¢¥¯¥»¥¹¤Ç¤­¤ë¡£¤³¤Î¥Õ¥¡¥¤¥ë¤ÏÂ礭¤µ 4 ¥Ð¥¤¥È¤Ç¤¢¤ë¡£
603 .I fpcr
604 ¥Õ¥¡¥¤¥ë¤Ë²Äǽ¤ÊÁàºî¤Ï°Ê²¼¤Ç¤¢¤ë¡£
605 .RS
606 .TP
607 .BR read (2)
608 .\"O If
609 .\"O .I count
610 .\"O is smaller than four,
611 .\"O .BR read (2)
612 .\"O returns \-1 and sets
613 .\"O .I errno
614 .\"O to
615 .\"O .BR EINVAL .
616 .\"O Otherwise, a four-byte value is placed in the data buffer;
617 .\"O this is the current value of the
618 .\"O .I fpcr
619 .\"O register.
620 .I count
621 ¤¬ 4 ¤è¤ê¾®¤µ¤¤¾ì¹ç¡¢
622 .BR read (2)
623 ¤Ï \-1 ¤òÊÖ¤·¡¢
624 .I errno
625 ¤ò
626 .B EINVAL
627 ¤ËÀßÄꤹ¤ë¡£
628 ¤½¤ì°Ê³°¤Î¾ì¹ç¡¢¥Ç¡¼¥¿¥Ð¥Ã¥Õ¥¡¤Ë 4 ¥Ð¥¤¥È¤ÎÃͤ¬½ñ¤­¹þ¤Þ¤ì¤ë¡£
629 ½ñ¤­¹þ¤Þ¤ì¤ëÃͤÏ
630 .I fpcr
631 ¥ì¥¸¥¹¥¿¤Î¸½ºß¤ÎÃͤǤ¢¤ë¡£
632 .TP
633 .BR write (2)
634 .\"O If
635 .\"O .I count
636 .\"O is smaller than four,
637 .\"O .BR write (2)
638 .\"O returns \-1 and sets
639 .\"O .I errno
640 .\"O to
641 .\"O .BR EINVAL .
642 .\"O Otherwise, a four-byte value is copied from the data buffer,
643 .\"O updating the value of the
644 .\"O .I fpcr
645 .\"O register.
646 .I count
647 ¤¬ 4 ¤è¤ê¾®¤µ¤¤¾ì¹ç¡¢
648 .BR write (2)
649 ¤Ï \-1 ¤òÊÖ¤·¡¢
650 .I errno
651 ¤ò
652 .B EINVAL
653 ¤ËÀßÄꤹ¤ë¡£
654 ¤½¤ì°Ê³°¤Î¾ì¹ç¡¢ 4 ¥Ð¥¤¥È¤ÎÃͤ¬¥Ç¡¼¥¿¥Ð¥Ã¥Õ¥¡¤«¤é¥³¥Ô¡¼¤µ¤ì¡¢
655 .I fpcr
656 ¥ì¥¸¥¹¥¿¤ÎÃͤ¬¹¹¿·¤µ¤ì¤ë¡£
657 .RE
658 .TP
659 .BR /signal1 ", " /signal2
660 .\"O The files provide access to the two signal notification channels
661 .\"O of an SPU.
662 .\"O These are read-write files that operate on 32-bit words.
663 .\"O Writing to one of these files triggers an interrupt on the SPU.
664 .\"O The value written to the signal files can
665 .\"O be read from the SPU through a channel read or from
666 .\"O host user space through the file.
667 .\"O After the value has been read by the SPU, it is reset to zero.
668 .\"O The possible operations on an open
669 .\"O .I signal1
670 .\"O or
671 .\"O .I signal2
672 .\"O file are:
673 ¤³¤ì¤é¤Î¥Õ¥¡¥¤¥ë¤Ë¤è¤ê
674 SPU ¤ÎÆó¤Ä¤Î¥·¥°¥Ê¥ëÄÌÃÎ¥Á¥ã¥Í¥ë (signal notification channel) ¤Ë
675 ¥¢¥¯¥»¥¹¤Ç¤­¤ë¡£
676 ¤³¤ì¤é¤Ï 32 ¥Ó¥Ã¥Èñ°Ì¤ÎÆɤ߽ñ¤­¤¬¤Ç¤­¤ë¡£
677 ¤³¤ì¤é¤Î¥Õ¥¡¥¤¥ë¤Î°ì¤Ä¤Ë½ñ¤­¹þ¤ß¤ò¹Ô¤¦¤È¡¢¤½¤Î SPU ¤Î³ä¤ê¹þ¤ß¤¬
678 ȯÀ¸¤¹¤ë¥È¥ê¥¬¡¼¤È¤Ê¤ë¡£
679 ¥·¥°¥Ê¥ë¥Õ¥¡¥¤¥ë¤Ø½ñ¤­¹þ¤Þ¤ì¤¿Ãͤϡ¢¥Á¥ã¥Í¥ë·Ðͳ¤Ç SPU ¤ÇÆɤ߽Ф·¤¿¤ê¡¢
680 ¤³¤Î¥Õ¥¡¥¤¥ë·Ðͳ¤Ç¥Û¥¹¥È¤Î¥æ¡¼¥¶¶õ´Ö¤ÇÆɤ߽Ф·¤¿¤ê¤Ç¤­¤ë¡£
681 SPU ¤¬ÃͤòÆɤ߽Ф·¤¿¸å¤Ç¤Ï¡¢ÃͤϠ0 ¤Ë¥ê¥»¥Ã¥È¤µ¤ì¤ë¡£
682 ¥ª¡¼¥×¥ó¤µ¤ì¤¿
683 .I signal1
684 ¤ä
685 .I signal2
686 ¥Õ¥¡¥¤¥ë¤Ë²Äǽ¤ÊÁàºî¤Ï°Ê²¼¤Ç¤¢¤ë¡£
687 .RS
688 .TP
689 .BR read (2)
690 .\"O If
691 .\"O .I count
692 .\"O is smaller than four,
693 .\"O .BR read (2)
694 .\"O returns \-1 and sets
695 .\"O .I errno
696 .\"O to
697 .\"O .BR EINVAL .
698 .\"O Otherwise, a four-byte value is placed in the data buffer;
699 .\"O this is the current value of the specified signal notification
700 .\"O register.
701 .I count
702 ¤¬ 4 ¤è¤ê¾®¤µ¤¤¾ì¹ç¡¢
703 .BR read (2)
704 ¤Ï \-1 ¤òÊÖ¤·¡¢
705 .I errno
706 ¤ò
707 .B EINVAL
708 ¤ËÀßÄꤹ¤ë¡£
709 ¤½¤ì°Ê³°¤Î¾ì¹ç¡¢¥Ç¡¼¥¿¥Ð¥Ã¥Õ¥¡¤Ë 4 ¥Ð¥¤¥È¤ÎÃͤ¬½ñ¤­¹þ¤Þ¤ì¤ë¡£
710 ½ñ¤­¹þ¤Þ¤ì¤ëÃͤϡ¢»ØÄꤵ¤ì¤¿¥·¥°¥Ê¥ëÄÌÃΥ쥸¥¹¥¿¤Î¸½ºß¤ÎÃͤǤ¢¤ë¡£
711 .TP
712 .BR write (2)
713 .\"O If
714 .\"O .I count
715 .\"O is smaller than four,
716 .\"O .BR write (2)
717 .\"O returns \-1 and sets
718 .\"O .I errno
719 .\"O to
720 .\"O .BR EINVAL .
721 .\"O Otherwise, a four-byte value is copied from the data buffer,
722 .\"O updating the value of the specified signal notification
723 .\"O register.
724 .I count
725 ¤¬ 4 ¤è¤ê¾®¤µ¤¤¾ì¹ç¡¢
726 .BR write (2)
727 ¤Ï \-1 ¤òÊÖ¤·¡¢
728 .I errno
729 ¤ò
730 .B EINVAL
731 ¤ËÀßÄꤹ¤ë¡£
732 ¤½¤ì°Ê³°¤Î¾ì¹ç¡¢ 4 ¥Ð¥¤¥È¤ÎÃͤ¬¥Ç¡¼¥¿¥Ð¥Ã¥Õ¥¡¤«¤é¥³¥Ô¡¼¤µ¤ì¡¢
733 »ØÄꤵ¤ì¤¿¥·¥°¥Ê¥ëÄÌÃΥ쥸¥¹¥¿¤ÎÃͤ¬¹¹¿·¤µ¤ì¤ë¡£
734 .\"O The signal notification register will either be replaced with
735 .\"O the input data or will be updated to the bitwise OR operation
736 .\"O of the old value and the input data, depending on the contents
737 .\"O of the
738 .\"O .I signal1_type
739 .\"O or
740 .\"O .I signal2_type
741 .\"O files respectively.
742 ¥·¥°¥Ê¥ëÄÌÃΥ쥸¥¹¥¿¤Î¹¹¿·¤Ë¤Ï¡¢¥ì¥¸¥¹¥¿ÃͤòÆþÎϥǡ¼¥¿¤ÇÃÖ¤­´¹¤¨¤ë¥â¡¼¥É¤È
743 °ÊÁ°¤ÎÃͤÈÆþÎϥǡ¼¥¿¤Î¥Ó¥Ã¥Èñ°Ì¤Î OR ¤ò¤È¤Ã¤¿Ãͤ˹¹¿·¤¹¤ë¥â¡¼¥É¤¬¤¢¤ë¡£
744 ¤É¤Á¤é¤Î¥â¡¼¥É¤Ë¤Ê¤ë¤«¤Ï¡¢¤½¤ì¤¾¤ì
745 .IR signal1_type ,
746 .I signal2_type
747 ¥Õ¥¡¥¤¥ë¤ÎÆâÍƤˤè¤Ã¤Æ·è¤Þ¤ë¡£
748 .RE
749 .TP
750 .BR /signal1_type ", " /signal2_type
751 .\"O These two files change the behavior of the
752 .\"O .I signal1
753 .\"O and
754 .\"O .I signal2
755 .\"O notification files.
756 ¤³¤ì¤é¤Î¥Õ¥¡¥¤¥ë¤Ï¡¢¥·¥°¥Ê¥ëÄÌÃÎ¥Õ¥¡¥¤¥ë
757 .I signal1
758 ¤È
759 .I signal2
760 ¤ÎÆ°ºî¤òÊѹ¹¤¹¤ë¡£
761 .\"O They contain a numerical
762 .\"O ASCII string which is read as either "1" or "0".
763 .\"O In mode 0 (overwrite), the hardware replaces the contents
764 .\"O of the signal channel with the data that is written to it.
765 .\"O In mode 1 (logical OR), the hardware accumulates the bits
766 .\"O that are subsequently written to it.
767 ¤³¤ì¤é¤Î¥Õ¥¡¥¤¥ë¤Ï¿ôÃͤòɽ¤¹¥¢¥¹¥­¡¼Ê¸»úÎó¤òÊÝ»ý¤·¡¢
768 Æɤ߽Ф¹¤È "1" ¤« "0" ¤Î¤É¤Á¤é¤«¤¬ÆÀ¤é¤ì¤ë¡£
769 ¥â¡¼¥É 0 (¾å½ñ¤­¥â¡¼¥É) ¤Ç¤Ï¡¢¥Ï¡¼¥É¥¦¥§¥¢¤Ï¥·¥°¥Ê¥ë¥Á¥ã¥Í¥ë¤ÎÆâÍƤò
770 ¥·¥°¥Ê¥ë¥Á¥ã¥Í¥ë¤Ë½ñ¤­¹þ¤Þ¤ì¤¿¥Ç¡¼¥¿¤ÇÃÖ¤­´¹¤¨¤ë¡£
771 ¥â¡¼¥É 1 (ÏÀÍý OR ¥â¡¼¥É) ¤Ç¤Ï¡¢¥Ï¡¼¥É¥¦¥§¥¢¤Ï¥·¥°¥Ê¥ë¥Á¥ã¥Í¥ë¤Ë
772 ½ñ¤­¹þ¤Þ¤ì¤¿¥Ó¥Ã¥È¤òÀÑ»»¤·¤Æ¤¤¤¯¡£
773 .\"O The possible operations on an open
774 .\"O .I signal1_type
775 .\"O or
776 .\"O .I signal2_type
777 .\"O file are:
778 ¥ª¡¼¥×¥ó¤µ¤ì¤¿
779 .I signal1_type
780 ¤ä
781 .I signal2_type
782 ¥Õ¥¡¥¤¥ë¤Ë²Äǽ¤ÊÁàºî¤Ï°Ê²¼¤Ç¤¢¤ë¡£
783 .RS
784 .TP
785 .BR read (2)
786 .\"O When the count supplied to the
787 .\"O .BR read (2)
788 .\"O call is shorter than the required length for the digit
789 .\"O plus a newline character, subsequent reads from the same
790 .\"O file descriptor will complete the string.
791 .\"O When a complete string has been read, all subsequent read operations
792 .\"O will return zero bytes and a new file descriptor needs to be opened
793 .\"O to read the value again.
794 .BR read (2)
795 ¤ËÅϤµ¤ì¤¿
796 .I count
797 ¤¬¥ì¥¸¥¹¥¿¤Î¿ôÃͤȲþ¹Ô (newline) Ê¸»ú 1 ¸Ä¤ò³ÊǼ¤¹¤ë¤Î¤ËɬÍפÊŤµ¤è¤ê
798 û¤¤¾ì¹ç¡¢Æ±¤¸¥Õ¥¡¥¤¥ë¥Ç¥£¥¹¥¯¥ê¥×¥¿¤ò³¤±¤Æ read ¤¹¤ë¤³¤È¤Ç¡¢
799 ʸ»úÎóÁ´ÂΤòÆɤ߽Ф¹¤³¤È¤¬¤Ç¤­¤ë¡£
800 ʸ»úÎóÁ´ÂΤ¬Æɤ߽Фµ¤ì¤ë¤È¡¢¤½¤ì°Ê¹ß¤Î read Áàºî¤Ç¤Ï 0 ¥Ð¥¤¥È¤¬ÊÖ¤µ¤ì¡¢
801 ¿·¤·¤¤ÃͤòÆɤ߽Ф¹¤Ë¤Ï¿·¤·¤¤¥Õ¥¡¥¤¥ë¥Ç¥£¥¹¥¯¥ê¥×¥¿¤ò¥ª¡¼¥×¥ó¤¹¤ëɬÍפ¬¤¢¤ë¡£
802 .TP
803 .BR write (2)
804 .\"O A
805 .\"O .BR write (2)
806 .\"O operation on the file sets the register to the
807 .\"O value given in the string.
808 .\"O The string is parsed from the beginning
809 .\"O until the first non-numeric character or the end of the buffer.
810 .\"O Subsequent writes to the same file descriptor overwrite the
811 .\"O previous setting.
812 ¤³¤Î¥Õ¥¡¥¤¥ë¤Ø¤Î
813 .BR write (2)
814 Áàºî¤Ï¥ì¥¸¥¹¥¿Ãͤòʸ»úÎó¤Ç»ØÄꤵ¤ì¤¿ÃͤËÀßÄꤹ¤ë¡£
815 ʸ»úÎó¤Î²ò¼á¤ÏÀèƬ¤«¤é³«»Ï¤µ¤ì¡¢¿ô»ú°Ê³°¤Îʸ»ú¤¬½é¤á¤ÆÅо줹¤ë¤«¡¢
816 ¥Ð¥Ã¥Õ¥¡¤ÎËöÈø¤Ë㤹¤ë¤Þ¤Ç¹Ô¤ï¤ì¤ë¡£
817 Ʊ¤¸¥Õ¥¡¥¤¥ë¥Ç¥£¥¹¥¯¥ê¥×¥¿¤Ø³¤±¤Æ write ¤ò¹Ô¤¦¤È¡¢
818 ¸å¤Î write ¤Ë¤è¤êÁ°¤ÎÀßÄ꤬¾å½ñ¤­¤µ¤ì¤ë¡£
819 .RE
820 .\"O .SH EXAMPLE
821 .SH Îã
822 .TP
823 .IR /etc/fstab "  entry"
824 none    /spu    spufs   gid=spu         0       0
825 .\" .SH AUTHORS
826 .\" Arnd Bergmann <arndb@de.ibm.com>,
827 .\" Mark Nutter <mnutter@us.ibm.com> and
828 .\" Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
829 .\"O .SH SEE ALSO
830 .SH ´ØÏ¢¹àÌÜ
831 .BR close (2),
832 .BR spu_create (2),
833 .BR spu_run (2)