sphinx.addnodesdocument)}( rawsourcechildren]( translations LanguagesNode)}(hhh](h pending_xref)}(hhh]docutils.nodesTextChinese (Simplified)}parenthsba attributes}(ids]classes]names]dupnames]backrefs] refdomainstdreftypedoc reftarget+/translations/zh_CN/filesystems/spufs/spufsmodnameN classnameN refexplicitutagnamehhh ubh)}(hhh]hChinese (Traditional)}hh2sbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget+/translations/zh_TW/filesystems/spufs/spufsmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hItalian}hhFsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget+/translations/it_IT/filesystems/spufs/spufsmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hJapanese}hhZsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget+/translations/ja_JP/filesystems/spufs/spufsmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hKorean}hhnsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget+/translations/ko_KR/filesystems/spufs/spufsmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hSpanish}hhsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget+/translations/sp_SP/filesystems/spufs/spufsmodnameN classnameN refexplicituh1hhh ubeh}(h]h ]h"]h$]h&]current_languageEnglishuh1h hh _documenthsourceNlineNubhcomment)}(h SPDX-License-Identifier: GPL-2.0h]h SPDX-License-Identifier: GPL-2.0}hhsbah}(h]h ]h"]h$]h&] xml:spacepreserveuh1hhhhhhE/var/lib/git/docbuild/linux/Documentation/filesystems/spufs/spufs.rsthKubhsection)}(hhh](htitle)}(hspufsh]hspufs}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(hNameh]hName}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhhhKubh block_quote)}(hspufs - the SPU file system h]h paragraph)}(hspufs - the SPU file systemh]hspufs - the SPU file system}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK hhubah}(h]h ]h"]h$]h&]uh1hhhhK hhhhubeh}(h]nameah ]h"]nameah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(h Descriptionh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhhhKubh)}(hXfThe SPU file system is used on PowerPC machines that implement the Cell Broadband Engine Architecture in order to access Synergistic Processor Units (SPUs). The file system provides a name space similar to posix shared memory or message queues. Users that have write permissions on the file system can use spu_create(2) to establish SPU contexts in the spufs root. Every SPU context is represented by a directory containing a predefined set of files. These files can be used for manipulating the state of the logical SPU. Users can change permissions on those files, but not actu- ally add or remove files. h](h)}(hThe SPU file system is used on PowerPC machines that implement the Cell Broadband Engine Architecture in order to access Synergistic Processor Units (SPUs).h]hThe SPU file system is used on PowerPC machines that implement the Cell Broadband Engine Architecture in order to access Synergistic Processor Units (SPUs).}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubh)}(hThe file system provides a name space similar to posix shared memory or message queues. Users that have write permissions on the file system can use spu_create(2) to establish SPU contexts in the spufs root.h]hThe file system provides a name space similar to posix shared memory or message queues. Users that have write permissions on the file system can use spu_create(2) to establish SPU contexts in the spufs root.}(hj!hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubh)}(hEvery SPU context is represented by a directory containing a predefined set of files. These files can be used for manipulating the state of the logical SPU. Users can change permissions on those files, but not actu- ally add or remove files.h]hEvery SPU context is represented by a directory containing a predefined set of files. These files can be used for manipulating the state of the logical SPU. Users can change permissions on those files, but not actu- ally add or remove files.}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubeh}(h]h ]h"]h$]h&]uh1hhhhKhhhhubeh}(h] descriptionah ]h"] descriptionah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(h Mount Optionsh]h Mount Options}(hjNhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjKhhhhhKubh)}(huid= set the user owning the mount point, the default is 0 (root). gid= set the group owning the mount point, the default is 0 (root). h]hdefinition_list)}(hhh](hdefinition_list_item)}(hHuid= set the user owning the mount point, the default is 0 (root). h](hterm)}(h uid=h]h uid=}(hjmhhhNhNubah}(h]h ]h"]h$]h&]uh1jkhhhK"hjgubh definition)}(hhh]h)}(h=set the user owning the mount point, the default is 0 (root).h]h=set the user owning the mount point, the default is 0 (root).}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK"hj}ubah}(h]h ]h"]h$]h&]uh1j{hjgubeh}(h]h ]h"]h$]h&]uh1jehhhK"hjbubjf)}(hJgid= set the group owning the mount point, the default is 0 (root). h](jl)}(h gid=h]h gid=}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jkhhhK&hjubj|)}(hhh]h)}(h>set the group owning the mount point, the default is 0 (root).h]h>set the group owning the mount point, the default is 0 (root).}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK%hjubah}(h]h ]h"]h$]h&]uh1j{hjubeh}(h]h ]h"]h$]h&]uh1jehhhK&hjbubeh}(h]h ]h"]h$]h&]uh1j`hj\ubah}(h]h ]h"]h$]h&]uh1hhhhK!hjKhhubeh}(h] mount-optionsah ]h"] mount optionsah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(hFilesh]hFiles}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhK)ubh)}(hX( The files in spufs mostly follow the standard behavior for regular sys- tem calls like read(2) or write(2), but often support only a subset of the operations supported on regular file systems. This list details the supported operations and the deviations from the behaviour in the respective man pages. All files that support the read(2) operation also support readv(2) and all files that support the write(2) operation also support writev(2). All files support the access(2) and stat(2) family of operations, but only the st_mode, st_nlink, st_uid and st_gid fields of struct stat contain reliable information. All files support the chmod(2)/fchmod(2) and chown(2)/fchown(2) opera- tions, but will not be able to grant permissions that contradict the possible operations, e.g. read access on the wbox file. The current set of files is: /mem the contents of the local storage memory of the SPU. This can be accessed like a regular shared memory file and contains both code and data in the address space of the SPU. The possible operations on an open mem file are: read(2), pread(2), write(2), pwrite(2), lseek(2) These operate as documented, with the exception that seek(2), write(2) and pwrite(2) are not supported beyond the end of the file. The file size is the size of the local storage of the SPU, which normally is 256 kilobytes. mmap(2) Mapping mem into the process address space gives access to the SPU local storage within the process address space. Only MAP_SHARED mappings are allowed. /mbox The first SPU to CPU communication mailbox. This file is read-only and can be read in units of 32 bits. The file can only be used in non- blocking mode and it even poll() will not block on it. The possible operations on an open mbox file are: read(2) If a count smaller than four is requested, read returns -1 and sets errno to EINVAL. If there is no data available in the mail box, the return value is set to -1 and errno becomes EAGAIN. When data has been read successfully, four bytes are placed in the data buffer and the value four is returned. /ibox The second SPU to CPU communication mailbox. This file is similar to the first mailbox file, but can be read in blocking I/O mode, and the poll family of system calls can be used to wait for it. The possible operations on an open ibox file are: read(2) If a count smaller than four is requested, read returns -1 and sets errno to EINVAL. If there is no data available in the mail box and the file descriptor has been opened with O_NONBLOCK, the return value is set to -1 and errno becomes EAGAIN. If there is no data available in the mail box and the file descriptor has been opened without O_NONBLOCK, the call will block until the SPU writes to its interrupt mailbox channel. When data has been read successfully, four bytes are placed in the data buffer and the value four is returned. poll(2) Poll on the ibox file returns (POLLIN | POLLRDNORM) whenever data is available for reading. /wbox The CPU to SPU communation mailbox. It is write-only and can be written in units of 32 bits. If the mailbox is full, write() will block and poll can be used to wait for it becoming empty again. The possible operations on an open wbox file are: write(2) If a count smaller than four is requested, write returns -1 and sets errno to EINVAL. If there is no space available in the mail box and the file descriptor has been opened with O_NONBLOCK, the return value is set to -1 and errno becomes EAGAIN. If there is no space available in the mail box and the file descriptor has been opened without O_NONBLOCK, the call will block until the SPU reads from its PPE mailbox channel. When data has been read success- fully, four bytes are placed in the data buffer and the value four is returned. poll(2) Poll on the ibox file returns (POLLOUT | POLLWRNORM) whenever space is available for writing. /mbox_stat, /ibox_stat, /wbox_stat Read-only files that contain the length of the current queue, i.e. how many words can be read from mbox or ibox or how many words can be written to wbox without blocking. The files can be read only in 4-byte units and return a big-endian binary integer number. The possible operations on an open ``*box_stat`` file are: read(2) If a count smaller than four is requested, read returns -1 and sets errno to EINVAL. Otherwise, a four byte value is placed in the data buffer, containing the number of elements that can be read from (for mbox_stat and ibox_stat) or written to (for wbox_stat) the respective mail box without blocking or resulting in EAGAIN. /npc, /decr, /decr_status, /spu_tag_mask, /event_mask, /srr0 Internal registers of the SPU. The representation is an ASCII string with the numeric value of the next instruction to be executed. These can be used in read/write mode for debugging, but normal operation of programs should not rely on them because access to any of them except npc requires an SPU context save and is therefore very inefficient. The contents of these files are: =================== =================================== npc Next Program Counter decr SPU Decrementer decr_status Decrementer Status spu_tag_mask MFC tag mask for SPU DMA event_mask Event mask for SPU interrupts srr0 Interrupt Return address register =================== =================================== The possible operations on an open npc, decr, decr_status, spu_tag_mask, event_mask or srr0 file are: read(2) When the count supplied to the read call is shorter than the required length for the pointer value plus a newline character, subsequent reads from the same file descriptor will result in completing the string, regardless of changes to the register by a running SPU task. When a complete string has been read, all subsequent read operations will return zero bytes and a new file descriptor needs to be opened to read the value again. write(2) A write operation on the file results in setting the register to the value given in the string. The string is parsed from the beginning to the first non-numeric character or the end of the buffer. Subsequent writes to the same file descriptor overwrite the previous setting. /fpcr This file gives access to the Floating Point Status and Control Regis- ter as a four byte long file. The operations on the fpcr file are: read(2) If a count smaller than four is requested, read returns -1 and sets errno to EINVAL. Otherwise, a four byte value is placed in the data buffer, containing the current value of the fpcr regis- ter. write(2) If a count smaller than four is requested, write returns -1 and sets errno to EINVAL. Otherwise, a four byte value is copied from the data buffer, updating the value of the fpcr register. /signal1, /signal2 The two signal notification channels of an SPU. These are read-write files that operate on a 32 bit word. Writing to one of these files triggers an interrupt on the SPU. The value written to the signal files can be read from the SPU through a channel read or from host user space through the file. After the value has been read by the SPU, it is reset to zero. The possible operations on an open signal1 or sig- nal2 file are: read(2) If a count smaller than four is requested, read returns -1 and sets errno to EINVAL. Otherwise, a four byte value is placed in the data buffer, containing the current value of the specified signal notification register. write(2) If a count smaller than four is requested, write returns -1 and sets errno to EINVAL. Otherwise, a four byte value is copied from the data buffer, updating the value of the specified signal notification register. The signal notification register will either be replaced with the input data or will be updated to the bitwise OR of the old value and the input data, depending on the contents of the signal1_type, or signal2_type respectively, file. /signal1_type, /signal2_type These two files change the behavior of the signal1 and signal2 notifi- cation files. The contain a numerical ASCII string which is read as either "1" or "0". In mode 0 (overwrite), the hardware replaces the contents of the signal channel with the data that is written to it. in mode 1 (logical OR), the hardware accumulates the bits that are subse- quently written to it. The possible operations on an open signal1_type or signal2_type file are: read(2) When the count supplied to the read call is shorter than the required length for the digit plus a newline character, subse- quent reads from the same file descriptor will result in com- pleting the string. When a complete string has been read, all subsequent read operations will return zero bytes and a new file descriptor needs to be opened to read the value again. write(2) A write operation on the file results in setting the register to the value given in the string. The string is parsed from the beginning to the first non-numeric character or the end of the buffer. Subsequent writes to the same file descriptor overwrite the previous setting. h](h)}(hX]The files in spufs mostly follow the standard behavior for regular sys- tem calls like read(2) or write(2), but often support only a subset of the operations supported on regular file systems. This list details the supported operations and the deviations from the behaviour in the respective man pages. All files that support the read(2) operation also support readv(2) and all files that support the write(2) operation also support writev(2). All files support the access(2) and stat(2) family of operations, but only the st_mode, st_nlink, st_uid and st_gid fields of struct stat contain reliable information. All files support the chmod(2)/fchmod(2) and chown(2)/fchown(2) opera- tions, but will not be able to grant permissions that contradict the possible operations, e.g. read access on the wbox file. The current set of files is: h](h)}(hX5The files in spufs mostly follow the standard behavior for regular sys- tem calls like read(2) or write(2), but often support only a subset of the operations supported on regular file systems. This list details the supported operations and the deviations from the behaviour in the respective man pages.h]hX5The files in spufs mostly follow the standard behavior for regular sys- tem calls like read(2) or write(2), but often support only a subset of the operations supported on regular file systems. This list details the supported operations and the deviations from the behaviour in the respective man pages.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK+hjubh)}(hX=All files that support the read(2) operation also support readv(2) and all files that support the write(2) operation also support writev(2). All files support the access(2) and stat(2) family of operations, but only the st_mode, st_nlink, st_uid and st_gid fields of struct stat contain reliable information.h]hX=All files that support the read(2) operation also support readv(2) and all files that support the write(2) operation also support writev(2). All files support the access(2) and stat(2) family of operations, but only the st_mode, st_nlink, st_uid and st_gid fields of struct stat contain reliable information.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK1hjubh)}(hAll files support the chmod(2)/fchmod(2) and chown(2)/fchown(2) opera- tions, but will not be able to grant permissions that contradict the possible operations, e.g. read access on the wbox file.h]hAll files support the chmod(2)/fchmod(2) and chown(2)/fchown(2) opera- tions, but will not be able to grant permissions that contradict the possible operations, e.g. read access on the wbox file.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK7hjubh)}(hThe current set of files is:h]hThe current set of files is:}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK;hjubeh}(h]h ]h"]h$]h&]uh1hhhhK+hjubh option_list)}(hhh](hoption_list_item)}(hhh](h option_group)}(hhh]hoption)}(h/memh]h option_string)}(hjGh]h/mem}hjKsbah}(h]h ]h"]h$]h&]uh1jIhjEubah}(h]h ]h"]h$]h&]uh1jChj@ubah}(h]h ]h"]h$]h&]uh1j>hj;ubh description)}(hXthe contents of the local storage memory of the SPU. This can be accessed like a regular shared memory file and contains both code and data in the address space of the SPU. The possible operations on an open mem file are: read(2), pread(2), write(2), pwrite(2), lseek(2) These operate as documented, with the exception that seek(2), write(2) and pwrite(2) are not supported beyond the end of the file. The file size is the size of the local storage of the SPU, which normally is 256 kilobytes. mmap(2) Mapping mem into the process address space gives access to the SPU local storage within the process address space. Only MAP_SHARED mappings are allowed. h](h)}(hthe contents of the local storage memory of the SPU. This can be accessed like a regular shared memory file and contains both code and data in the address space of the SPU. The possible operations on an open mem file are:h]hthe contents of the local storage memory of the SPU. This can be accessed like a regular shared memory file and contains both code and data in the address space of the SPU. The possible operations on an open mem file are:}(hjjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK?hjfubja)}(hhh](jf)}(hXread(2), pread(2), write(2), pwrite(2), lseek(2) These operate as documented, with the exception that seek(2), write(2) and pwrite(2) are not supported beyond the end of the file. The file size is the size of the local storage of the SPU, which normally is 256 kilobytes. h](jl)}(h0read(2), pread(2), write(2), pwrite(2), lseek(2)h]h0read(2), pread(2), write(2), pwrite(2), lseek(2)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jkhhhKHhj{ubj|)}(hhh]h)}(hThese operate as documented, with the exception that seek(2), write(2) and pwrite(2) are not supported beyond the end of the file. The file size is the size of the local storage of the SPU, which normally is 256 kilobytes.h]hThese operate as documented, with the exception that seek(2), write(2) and pwrite(2) are not supported beyond the end of the file. The file size is the size of the local storage of the SPU, which normally is 256 kilobytes.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKEhjubah}(h]h ]h"]h$]h&]uh1j{hj{ubeh}(h]h ]h"]h$]h&]uh1jehhhKHhjxubjf)}(hmmap(2) Mapping mem into the process address space gives access to the SPU local storage within the process address space. Only MAP_SHARED mappings are allowed. h](jl)}(hmmap(2)h]hmmap(2)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jkhhhKNhjubj|)}(hhh]h)}(hMapping mem into the process address space gives access to the SPU local storage within the process address space. Only MAP_SHARED mappings are allowed.h]hMapping mem into the process address space gives access to the SPU local storage within the process address space. Only MAP_SHARED mappings are allowed.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKKhjubah}(h]h ]h"]h$]h&]uh1j{hjubeh}(h]h ]h"]h$]h&]uh1jehhhKNhjxubeh}(h]h ]h"]h$]h&]uh1j`hjfubeh}(h]h ]h"]h$]h&]uh1jdhj;ubeh}(h]h ]h"]h$]h&]uh1j9hj6ubj:)}(hhh](j?)}(hhh]jD)}(h/mboxh]jJ)}(hjh]h/mbox}hjsbah}(h]h ]h"]h$]h&]uh1jIhjubah}(h]h ]h"]h$]h&]uh1jChjubah}(h]h ]h"]h$]h&]uh1j>hjubje)}(hX^The first SPU to CPU communication mailbox. This file is read-only and can be read in units of 32 bits. The file can only be used in non- blocking mode and it even poll() will not block on it. The possible operations on an open mbox file are: read(2) If a count smaller than four is requested, read returns -1 and sets errno to EINVAL. If there is no data available in the mail box, the return value is set to -1 and errno becomes EAGAIN. When data has been read successfully, four bytes are placed in the data buffer and the value four is returned. h](h)}(hThe first SPU to CPU communication mailbox. This file is read-only and can be read in units of 32 bits. The file can only be used in non- blocking mode and it even poll() will not block on it. The possible operations on an open mbox file are:h]hThe first SPU to CPU communication mailbox. This file is read-only and can be read in units of 32 bits. The file can only be used in non- blocking mode and it even poll() will not block on it. The possible operations on an open mbox file are:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKQhjubja)}(hhh]jf)}(hX=read(2) If a count smaller than four is requested, read returns -1 and sets errno to EINVAL. If there is no data available in the mail box, the return value is set to -1 and errno becomes EAGAIN. When data has been read successfully, four bytes are placed in the data buffer and the value four is returned. h](jl)}(hread(2)h]hread(2)}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1jkhhhK\hj#ubj|)}(hhh]h)}(hX3If a count smaller than four is requested, read returns -1 and sets errno to EINVAL. If there is no data available in the mail box, the return value is set to -1 and errno becomes EAGAIN. When data has been read successfully, four bytes are placed in the data buffer and the value four is returned.h]hX3If a count smaller than four is requested, read returns -1 and sets errno to EINVAL. If there is no data available in the mail box, the return value is set to -1 and errno becomes EAGAIN. When data has been read successfully, four bytes are placed in the data buffer and the value four is returned.}(hj8hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKWhj5ubah}(h]h ]h"]h$]h&]uh1j{hj#ubeh}(h]h ]h"]h$]h&]uh1jehhhK\hj ubah}(h]h ]h"]h$]h&]uh1j`hjubeh}(h]h ]h"]h$]h&]uh1jdhjubeh}(h]h ]h"]h$]h&]uh1j9hj6ubj:)}(hhh](j?)}(hhh]jD)}(h/iboxh]jJ)}(hjlh]h/ibox}hjnsbah}(h]h ]h"]h$]h&]uh1jIhjjubah}(h]h ]h"]h$]h&]uh1jChjgubah}(h]h ]h"]h$]h&]uh1j>hjdubje)}(hXThe second SPU to CPU communication mailbox. This file is similar to the first mailbox file, but can be read in blocking I/O mode, and the poll family of system calls can be used to wait for it. The possible operations on an open ibox file are: read(2) If a count smaller than four is requested, read returns -1 and sets errno to EINVAL. If there is no data available in the mail box and the file descriptor has been opened with O_NONBLOCK, the return value is set to -1 and errno becomes EAGAIN. If there is no data available in the mail box and the file descriptor has been opened without O_NONBLOCK, the call will block until the SPU writes to its interrupt mailbox channel. When data has been read successfully, four bytes are placed in the data buffer and the value four is returned. poll(2) Poll on the ibox file returns (POLLIN | POLLRDNORM) whenever data is available for reading. h](h)}(hThe second SPU to CPU communication mailbox. This file is similar to the first mailbox file, but can be read in blocking I/O mode, and the poll family of system calls can be used to wait for it. The possible operations on an open ibox file are:h]hThe second SPU to CPU communication mailbox. This file is similar to the first mailbox file, but can be read in blocking I/O mode, and the poll family of system calls can be used to wait for it. The possible operations on an open ibox file are:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK_hjubja)}(hhh](jf)}(hX4read(2) If a count smaller than four is requested, read returns -1 and sets errno to EINVAL. If there is no data available in the mail box and the file descriptor has been opened with O_NONBLOCK, the return value is set to -1 and errno becomes EAGAIN. If there is no data available in the mail box and the file descriptor has been opened without O_NONBLOCK, the call will block until the SPU writes to its interrupt mailbox channel. When data has been read successfully, four bytes are placed in the data buffer and the value four is returned. h](jl)}(hread(2)h]hread(2)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jkhhhKnhjubj|)}(hhh](h)}(hIf a count smaller than four is requested, read returns -1 and sets errno to EINVAL. If there is no data available in the mail box and the file descriptor has been opened with O_NONBLOCK, the return value is set to -1 and errno becomes EAGAIN.h]hIf a count smaller than four is requested, read returns -1 and sets errno to EINVAL. If there is no data available in the mail box and the file descriptor has been opened with O_NONBLOCK, the return value is set to -1 and errno becomes EAGAIN.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKehjubh)}(hX3If there is no data available in the mail box and the file descriptor has been opened without O_NONBLOCK, the call will block until the SPU writes to its interrupt mailbox channel. When data has been read successfully, four bytes are placed in the data buffer and the value four is returned.h]hX3If there is no data available in the mail box and the file descriptor has been opened without O_NONBLOCK, the call will block until the SPU writes to its interrupt mailbox channel. When data has been read successfully, four bytes are placed in the data buffer and the value four is returned.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKjhjubeh}(h]h ]h"]h$]h&]uh1j{hjubeh}(h]h ]h"]h$]h&]uh1jehhhKnhjubjf)}(hipoll(2) Poll on the ibox file returns (POLLIN | POLLRDNORM) whenever data is available for reading. h](jl)}(hpoll(2)h]hpoll(2)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jkhhhKshjubj|)}(hhh]h)}(h_Poll on the ibox file returns (POLLIN | POLLRDNORM) whenever data is available for reading.h]h_Poll on the ibox file returns (POLLIN | POLLRDNORM) whenever data is available for reading.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKqhjubah}(h]h ]h"]h$]h&]uh1j{hjubeh}(h]h ]h"]h$]h&]uh1jehhhKshjubeh}(h]h ]h"]h$]h&]uh1j`hjubeh}(h]h ]h"]h$]h&]uh1jdhjdubeh}(h]h ]h"]h$]h&]uh1j9hj6ubj:)}(hhh](j?)}(hhh]jD)}(h/wboxh]jJ)}(hj"h]h/wbox}hj$sbah}(h]h ]h"]h$]h&]uh1jIhj ubah}(h]h ]h"]h$]h&]uh1jChjubah}(h]h ]h"]h$]h&]uh1j>hjubje)}(hXThe CPU to SPU communation mailbox. It is write-only and can be written in units of 32 bits. If the mailbox is full, write() will block and poll can be used to wait for it becoming empty again. The possible operations on an open wbox file are: write(2) If a count smaller than four is requested, write returns -1 and sets errno to EINVAL. If there is no space available in the mail box and the file descriptor has been opened with O_NONBLOCK, the return value is set to -1 and errno becomes EAGAIN. If there is no space available in the mail box and the file descriptor has been opened without O_NONBLOCK, the call will block until the SPU reads from its PPE mailbox channel. When data has been read success- fully, four bytes are placed in the data buffer and the value four is returned. poll(2) Poll on the ibox file returns (POLLOUT | POLLWRNORM) whenever space is available for writing. h](h)}(hXThe CPU to SPU communation mailbox. It is write-only and can be written in units of 32 bits. If the mailbox is full, write() will block and poll can be used to wait for it becoming empty again. The possible operations on an open wbox file are: write(2) If a count smaller than four is requested, write returns -1 and sets errno to EINVAL. If there is no space available in the mail box and the file descriptor has been opened with O_NONBLOCK, the return value is set to -1 and errno becomes EAGAIN.h]hXThe CPU to SPU communation mailbox. It is write-only and can be written in units of 32 bits. If the mailbox is full, write() will block and poll can be used to wait for it becoming empty again. The possible operations on an open wbox file are: write(2) If a count smaller than four is requested, write returns -1 and sets errno to EINVAL. If there is no space available in the mail box and the file descriptor has been opened with O_NONBLOCK, the return value is set to -1 and errno becomes EAGAIN.}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKvhj=ubh)}(hX)If there is no space available in the mail box and the file descriptor has been opened without O_NONBLOCK, the call will block until the SPU reads from its PPE mailbox channel. When data has been read success- fully, four bytes are placed in the data buffer and the value four is returned.h]hX)If there is no space available in the mail box and the file descriptor has been opened without O_NONBLOCK, the call will block until the SPU reads from its PPE mailbox channel. When data has been read success- fully, four bytes are placed in the data buffer and the value four is returned.}(hjOhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj=ubja)}(hhh]jf)}(hjpoll(2) Poll on the ibox file returns (POLLOUT | POLLWRNORM) whenever space is available for writing. h](jl)}(hpoll(2)h]hpoll(2)}(hjdhhhNhNubah}(h]h ]h"]h$]h&]uh1jkhhhKhj`ubj|)}(hhh]h)}(h`Poll on the ibox file returns (POLLOUT | POLLWRNORM) whenever space is available for writing.h]h`Poll on the ibox file returns (POLLOUT | POLLWRNORM) whenever space is available for writing.}(hjuhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjrubah}(h]h ]h"]h$]h&]uh1j{hj`ubeh}(h]h ]h"]h$]h&]uh1jehhhKhj]ubah}(h]h ]h"]h$]h&]uh1j`hj=ubeh}(h]h ]h"]h$]h&]uh1jdhjubeh}(h]h ]h"]h$]h&]uh1j9hj6ubj:)}(hhh](j?)}(hhh](jD)}(h /mbox_stath]jJ)}(hjh]h /mbox_stat}hjsbah}(h]h ]h"]h$]h&]uh1jIhjubah}(h]h ]h"]h$]h&]uh1jChjubjD)}(h /ibox_stath]jJ)}(hjh]h /ibox_stat}hjsbah}(h]h ]h"]h$]h&]uh1jIhjubah}(h]h ]h"]h$]h&]uh1jChjubjD)}(h /wbox_stath]jJ)}(hjh]h /wbox_stat}hjsbah}(h]h ]h"]h$]h&]uh1jIhjubah}(h]h ]h"]h$]h&]uh1jChjubeh}(h]h ]h"]h$]h&]uh1j>hjubje)}(hXRead-only files that contain the length of the current queue, i.e. how many words can be read from mbox or ibox or how many words can be written to wbox without blocking. The files can be read only in 4-byte units and return a big-endian binary integer number. The possible operations on an open ``*box_stat`` file are: read(2) If a count smaller than four is requested, read returns -1 and sets errno to EINVAL. Otherwise, a four byte value is placed in the data buffer, containing the number of elements that can be read from (for mbox_stat and ibox_stat) or written to (for wbox_stat) the respective mail box without blocking or resulting in EAGAIN. h](h)}(hXMRead-only files that contain the length of the current queue, i.e. how many words can be read from mbox or ibox or how many words can be written to wbox without blocking. The files can be read only in 4-byte units and return a big-endian binary integer number. The possible operations on an open ``*box_stat`` file are:h](hX6Read-only files that contain the length of the current queue, i.e. how many words can be read from mbox or ibox or how many words can be written to wbox without blocking. The files can be read only in 4-byte units and return a big-endian binary integer number. The possible operations on an open }(hjhhhNhNubhliteral)}(h ``*box_stat``h]h *box_stat}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh file are:}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjubja)}(hhh]jf)}(hXYread(2) If a count smaller than four is requested, read returns -1 and sets errno to EINVAL. Otherwise, a four byte value is placed in the data buffer, containing the number of elements that can be read from (for mbox_stat and ibox_stat) or written to (for wbox_stat) the respective mail box without blocking or resulting in EAGAIN. h](jl)}(hread(2)h]hread(2)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jkhhhKhjubj|)}(hhh]h)}(hXOIf a count smaller than four is requested, read returns -1 and sets errno to EINVAL. Otherwise, a four byte value is placed in the data buffer, containing the number of elements that can be read from (for mbox_stat and ibox_stat) or written to (for wbox_stat) the respective mail box without blocking or resulting in EAGAIN.h]hXOIf a count smaller than four is requested, read returns -1 and sets errno to EINVAL. Otherwise, a four byte value is placed in the data buffer, containing the number of elements that can be read from (for mbox_stat and ibox_stat) or written to (for wbox_stat) the respective mail box without blocking or resulting in EAGAIN.}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj-ubah}(h]h ]h"]h$]h&]uh1j{hjubeh}(h]h ]h"]h$]h&]uh1jehhhKhjubah}(h]h ]h"]h$]h&]uh1j`hjubeh}(h]h ]h"]h$]h&]uh1jdhjubeh}(h]h ]h"]h$]h&]uh1j9hj6ubj:)}(hhh](j?)}(hhh](jD)}(h/npch]jJ)}(hjdh]h/npc}hjfsbah}(h]h ]h"]h$]h&]uh1jIhjbubah}(h]h ]h"]h$]h&]uh1jChj_ubjD)}(h/decrh]jJ)}(hj{h]h/decr}hj}sbah}(h]h ]h"]h$]h&]uh1jIhjyubah}(h]h ]h"]h$]h&]uh1jChj_ubjD)}(h /decr_statush]jJ)}(hjh]h /decr_status}hjsbah}(h]h ]h"]h$]h&]uh1jIhjubah}(h]h ]h"]h$]h&]uh1jChj_ubjD)}(h /spu_tag_maskh]jJ)}(hjh]h /spu_tag_mask}hjsbah}(h]h ]h"]h$]h&]uh1jIhjubah}(h]h ]h"]h$]h&]uh1jChj_ubjD)}(h /event_maskh]jJ)}(hjh]h /event_mask}hjsbah}(h]h ]h"]h$]h&]uh1jIhjubah}(h]h ]h"]h$]h&]uh1jChj_ubjD)}(h/srr0h]jJ)}(hjh]h/srr0}hjsbah}(h]h ]h"]h$]h&]uh1jIhjubah}(h]h ]h"]h$]h&]uh1jChj_ubeh}(h]h ]h"]h$]h&]uh1j>hj\ubje)}(hXInternal registers of the SPU. The representation is an ASCII string with the numeric value of the next instruction to be executed. These can be used in read/write mode for debugging, but normal operation of programs should not rely on them because access to any of them except npc requires an SPU context save and is therefore very inefficient. The contents of these files are: =================== =================================== npc Next Program Counter decr SPU Decrementer decr_status Decrementer Status spu_tag_mask MFC tag mask for SPU DMA event_mask Event mask for SPU interrupts srr0 Interrupt Return address register =================== =================================== The possible operations on an open npc, decr, decr_status, spu_tag_mask, event_mask or srr0 file are: read(2) When the count supplied to the read call is shorter than the required length for the pointer value plus a newline character, subsequent reads from the same file descriptor will result in completing the string, regardless of changes to the register by a running SPU task. When a complete string has been read, all subsequent read operations will return zero bytes and a new file descriptor needs to be opened to read the value again. write(2) A write operation on the file results in setting the register to the value given in the string. The string is parsed from the beginning to the first non-numeric character or the end of the buffer. Subsequent writes to the same file descriptor overwrite the previous setting. h](h)}(hXcInternal registers of the SPU. The representation is an ASCII string with the numeric value of the next instruction to be executed. These can be used in read/write mode for debugging, but normal operation of programs should not rely on them because access to any of them except npc requires an SPU context save and is therefore very inefficient.h]hXcInternal registers of the SPU. The representation is an ASCII string with the numeric value of the next instruction to be executed. These can be used in read/write mode for debugging, but normal operation of programs should not rely on them because access to any of them except npc requires an SPU context save and is therefore very inefficient.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubh)}(h The contents of these files are:h]h The contents of these files are:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubhtable)}(hhh]htgroup)}(hhh](hcolspec)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jhjubj)}(hhh]h}(h]h ]h"]h$]h&]colwidthK#uh1jhjubhtbody)}(hhh](hrow)}(hhh](hentry)}(hhh]h)}(hnpch]hnpc}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj>ubah}(h]h ]h"]h$]h&]uh1j<hj9ubj=)}(hhh]h)}(hNext Program Counterh]hNext Program Counter}(hjXhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjUubah}(h]h ]h"]h$]h&]uh1j<hj9ubeh}(h]h ]h"]h$]h&]uh1j7hj4ubj8)}(hhh](j=)}(hhh]h)}(hdecrh]hdecr}(hjxhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjuubah}(h]h ]h"]h$]h&]uh1j<hjrubj=)}(hhh]h)}(hSPU Decrementerh]hSPU Decrementer}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1j<hjrubeh}(h]h ]h"]h$]h&]uh1j7hj4ubj8)}(hhh](j=)}(hhh]h)}(h decr_statush]h decr_status}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1j<hjubj=)}(hhh]h)}(hDecrementer Statush]hDecrementer Status}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1j<hjubeh}(h]h ]h"]h$]h&]uh1j7hj4ubj8)}(hhh](j=)}(hhh]h)}(h spu_tag_maskh]h spu_tag_mask}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1j<hjubj=)}(hhh]h)}(hMFC tag mask for SPU DMAh]hMFC tag mask for SPU DMA}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1j<hjubeh}(h]h ]h"]h$]h&]uh1j7hj4ubj8)}(hhh](j=)}(hhh]h)}(h event_maskh]h event_mask}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1j<hjubj=)}(hhh]h)}(hEvent mask for SPU interruptsh]hEvent mask for SPU interrupts}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj1ubah}(h]h ]h"]h$]h&]uh1j<hjubeh}(h]h ]h"]h$]h&]uh1j7hj4ubj8)}(hhh](j=)}(hhh]h)}(hsrr0h]hsrr0}(hjThhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjQubah}(h]h ]h"]h$]h&]uh1j<hjNubj=)}(hhh]h)}(h!Interrupt Return address registerh]h!Interrupt Return address register}(hjkhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhubah}(h]h ]h"]h$]h&]uh1j<hjNubeh}(h]h ]h"]h$]h&]uh1j7hj4ubeh}(h]h ]h"]h$]h&]uh1j2hjubeh}(h]h ]h"]h$]h&]colsKuh1jhjubah}(h]h ]h"]h$]h&]uh1jhjubh)}(hrThe possible operations on an open npc, decr, decr_status, spu_tag_mask, event_mask or srr0 file are:h]hrThe possible operations on an open npc, decr, decr_status, spu_tag_mask, event_mask or srr0 file are:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubja)}(hhh](jf)}(hXread(2) When the count supplied to the read call is shorter than the required length for the pointer value plus a newline character, subsequent reads from the same file descriptor will result in completing the string, regardless of changes to the register by a running SPU task. When a complete string has been read, all subsequent read operations will return zero bytes and a new file descriptor needs to be opened to read the value again. h](jl)}(hread(2)h]hread(2)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jkhhhKhjubj|)}(hhh]h)}(hXWhen the count supplied to the read call is shorter than the required length for the pointer value plus a newline character, subsequent reads from the same file descriptor will result in completing the string, regardless of changes to the register by a running SPU task. When a complete string has been read, all subsequent read operations will return zero bytes and a new file descriptor needs to be opened to read the value again.h]hXWhen the count supplied to the read call is shorter than the required length for the pointer value plus a newline character, subsequent reads from the same file descriptor will result in completing the string, regardless of changes to the register by a running SPU task. When a complete string has been read, all subsequent read operations will return zero bytes and a new file descriptor needs to be opened to read the value again.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1j{hjubeh}(h]h ]h"]h$]h&]uh1jehhhKhjubjf)}(hX$write(2) A write operation on the file results in setting the register to the value given in the string. The string is parsed from the beginning to the first non-numeric character or the end of the buffer. Subsequent writes to the same file descriptor overwrite the previous setting. h](jl)}(hwrite(2)h]hwrite(2)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jkhhhKhjubj|)}(hhh]h)}(hXA write operation on the file results in setting the register to the value given in the string. The string is parsed from the beginning to the first non-numeric character or the end of the buffer. Subsequent writes to the same file descriptor overwrite the previous setting.h]hXA write operation on the file results in setting the register to the value given in the string. The string is parsed from the beginning to the first non-numeric character or the end of the buffer. Subsequent writes to the same file descriptor overwrite the previous setting.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1j{hjubeh}(h]h ]h"]h$]h&]uh1jehhhKhjubeh}(h]h ]h"]h$]h&]uh1j`hjubeh}(h]h ]h"]h$]h&]uh1jdhj\ubeh}(h]h ]h"]h$]h&]uh1j9hj6ubj:)}(hhh](j?)}(hhh]jD)}(h/fpcrh]jJ)}(hj!h]h/fpcr}hj#sbah}(h]h ]h"]h$]h&]uh1jIhjubah}(h]h ]h"]h$]h&]uh1jChjubah}(h]h ]h"]h$]h&]uh1j>hjubje)}(hXYThis file gives access to the Floating Point Status and Control Regis- ter as a four byte long file. The operations on the fpcr file are: read(2) If a count smaller than four is requested, read returns -1 and sets errno to EINVAL. Otherwise, a four byte value is placed in the data buffer, containing the current value of the fpcr regis- ter. write(2) If a count smaller than four is requested, write returns -1 and sets errno to EINVAL. Otherwise, a four byte value is copied from the data buffer, updating the value of the fpcr register. h](h)}(hThis file gives access to the Floating Point Status and Control Regis- ter as a four byte long file. The operations on the fpcr file are:h]hThis file gives access to the Floating Point Status and Control Regis- ter as a four byte long file. The operations on the fpcr file are:}(hj@hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj<ubja)}(hhh](jf)}(hread(2) If a count smaller than four is requested, read returns -1 and sets errno to EINVAL. Otherwise, a four byte value is placed in the data buffer, containing the current value of the fpcr regis- ter. h](jl)}(hread(2)h]hread(2)}(hjUhhhNhNubah}(h]h ]h"]h$]h&]uh1jkhhhKhjQubj|)}(hhh]h)}(hIf a count smaller than four is requested, read returns -1 and sets errno to EINVAL. Otherwise, a four byte value is placed in the data buffer, containing the current value of the fpcr regis- ter.h]hIf a count smaller than four is requested, read returns -1 and sets errno to EINVAL. Otherwise, a four byte value is placed in the data buffer, containing the current value of the fpcr regis- ter.}(hjfhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjcubah}(h]h ]h"]h$]h&]uh1j{hjQubeh}(h]h ]h"]h$]h&]uh1jehhhKhjNubjf)}(hwrite(2) If a count smaller than four is requested, write returns -1 and sets errno to EINVAL. Otherwise, a four byte value is copied from the data buffer, updating the value of the fpcr register. h](jl)}(hwrite(2)h]hwrite(2)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jkhhhKhjubj|)}(hhh]h)}(hIf a count smaller than four is requested, write returns -1 and sets errno to EINVAL. Otherwise, a four byte value is copied from the data buffer, updating the value of the fpcr register.h]hIf a count smaller than four is requested, write returns -1 and sets errno to EINVAL. Otherwise, a four byte value is copied from the data buffer, updating the value of the fpcr register.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1j{hjubeh}(h]h ]h"]h$]h&]uh1jehhhKhjNubeh}(h]h ]h"]h$]h&]uh1j`hj<ubeh}(h]h ]h"]h$]h&]uh1jdhjubeh}(h]h ]h"]h$]h&]uh1j9hj6ubj:)}(hhh](j?)}(hhh](jD)}(h/signal1h]jJ)}(hjh]h/signal1}hjsbah}(h]h ]h"]h$]h&]uh1jIhjubah}(h]h ]h"]h$]h&]uh1jChjubjD)}(h/signal2h]jJ)}(hjh]h/signal2}hjsbah}(h]h ]h"]h$]h&]uh1jIhjubah}(h]h ]h"]h$]h&]uh1jChjubeh}(h]h ]h"]h$]h&]uh1j>hjubje)}(hXThe two signal notification channels of an SPU. These are read-write files that operate on a 32 bit word. Writing to one of these files triggers an interrupt on the SPU. The value written to the signal files can be read from the SPU through a channel read or from host user space through the file. After the value has been read by the SPU, it is reset to zero. The possible operations on an open signal1 or sig- nal2 file are: read(2) If a count smaller than four is requested, read returns -1 and sets errno to EINVAL. Otherwise, a four byte value is placed in the data buffer, containing the current value of the specified signal notification register. write(2) If a count smaller than four is requested, write returns -1 and sets errno to EINVAL. Otherwise, a four byte value is copied from the data buffer, updating the value of the specified signal notification register. The signal notification register will either be replaced with the input data or will be updated to the bitwise OR of the old value and the input data, depending on the contents of the signal1_type, or signal2_type respectively, file. h](h)}(hXThe two signal notification channels of an SPU. These are read-write files that operate on a 32 bit word. Writing to one of these files triggers an interrupt on the SPU. The value written to the signal files can be read from the SPU through a channel read or from host user space through the file. After the value has been read by the SPU, it is reset to zero. The possible operations on an open signal1 or sig- nal2 file are:h]hXThe two signal notification channels of an SPU. These are read-write files that operate on a 32 bit word. Writing to one of these files triggers an interrupt on the SPU. The value written to the signal files can be read from the SPU through a channel read or from host user space through the file. After the value has been read by the SPU, it is reset to zero. The possible operations on an open signal1 or sig- nal2 file are:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubja)}(hhh](jf)}(hread(2) If a count smaller than four is requested, read returns -1 and sets errno to EINVAL. Otherwise, a four byte value is placed in the data buffer, containing the current value of the specified signal notification register. h](jl)}(hread(2)h]hread(2)}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jkhhhKhj ubj|)}(hhh]h)}(hIf a count smaller than four is requested, read returns -1 and sets errno to EINVAL. Otherwise, a four byte value is placed in the data buffer, containing the current value of the specified signal notification register.h]hIf a count smaller than four is requested, read returns -1 and sets errno to EINVAL. Otherwise, a four byte value is placed in the data buffer, containing the current value of the specified signal notification register.}(hj% hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj" ubah}(h]h ]h"]h$]h&]uh1j{hj ubeh}(h]h ]h"]h$]h&]uh1jehhhKhj ubjf)}(hXwrite(2) If a count smaller than four is requested, write returns -1 and sets errno to EINVAL. Otherwise, a four byte value is copied from the data buffer, updating the value of the specified signal notification register. The signal notification register will either be replaced with the input data or will be updated to the bitwise OR of the old value and the input data, depending on the contents of the signal1_type, or signal2_type respectively, file. h](jl)}(hwrite(2)h]hwrite(2)}(hjC hhhNhNubah}(h]h ]h"]h$]h&]uh1jkhhhKhj? ubj|)}(hhh]h)}(hXIf a count smaller than four is requested, write returns -1 and sets errno to EINVAL. Otherwise, a four byte value is copied from the data buffer, updating the value of the specified signal notification register. The signal notification register will either be replaced with the input data or will be updated to the bitwise OR of the old value and the input data, depending on the contents of the signal1_type, or signal2_type respectively, file.h]hXIf a count smaller than four is requested, write returns -1 and sets errno to EINVAL. Otherwise, a four byte value is copied from the data buffer, updating the value of the specified signal notification register. The signal notification register will either be replaced with the input data or will be updated to the bitwise OR of the old value and the input data, depending on the contents of the signal1_type, or signal2_type respectively, file.}(hjT hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjQ ubah}(h]h ]h"]h$]h&]uh1j{hj? ubeh}(h]h ]h"]h$]h&]uh1jehhhKhj ubeh}(h]h ]h"]h$]h&]uh1j`hjubeh}(h]h ]h"]h$]h&]uh1jdhjubeh}(h]h ]h"]h$]h&]uh1j9hj6ubj:)}(hhh](j?)}(hhh](jD)}(h /signal1_typeh]jJ)}(hj h]h /signal1_type}hj sbah}(h]h ]h"]h$]h&]uh1jIhj ubah}(h]h ]h"]h$]h&]uh1jChj ubjD)}(h /signal2_typeh]jJ)}(hj h]h /signal2_type}hj sbah}(h]h ]h"]h$]h&]uh1jIhj ubah}(h]h ]h"]h$]h&]uh1jChj ubeh}(h]h ]h"]h$]h&]uh1j>hj ubje)}(hXThese two files change the behavior of the signal1 and signal2 notifi- cation files. The contain a numerical ASCII string which is read as either "1" or "0". In mode 0 (overwrite), the hardware replaces the contents of the signal channel with the data that is written to it. in mode 1 (logical OR), the hardware accumulates the bits that are subse- quently written to it. The possible operations on an open signal1_type or signal2_type file are: read(2) When the count supplied to the read call is shorter than the required length for the digit plus a newline character, subse- quent reads from the same file descriptor will result in com- pleting the string. When a complete string has been read, all subsequent read operations will return zero bytes and a new file descriptor needs to be opened to read the value again. write(2) A write operation on the file results in setting the register to the value given in the string. The string is parsed from the beginning to the first non-numeric character or the end of the buffer. Subsequent writes to the same file descriptor overwrite the previous setting. h](h)}(hXThese two files change the behavior of the signal1 and signal2 notifi- cation files. The contain a numerical ASCII string which is read as either "1" or "0". In mode 0 (overwrite), the hardware replaces the contents of the signal channel with the data that is written to it. in mode 1 (logical OR), the hardware accumulates the bits that are subse- quently written to it. The possible operations on an open signal1_type or signal2_type file are:h]hXThese two files change the behavior of the signal1 and signal2 notifi- cation files. The contain a numerical ASCII string which is read as either “1” or “0”. In mode 0 (overwrite), the hardware replaces the contents of the signal channel with the data that is written to it. in mode 1 (logical OR), the hardware accumulates the bits that are subse- quently written to it. The possible operations on an open signal1_type or signal2_type file are:}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj ubja)}(hhh](jf)}(hXread(2) When the count supplied to the read call is shorter than the required length for the digit plus a newline character, subse- quent reads from the same file descriptor will result in com- pleting the string. When a complete string has been read, all subsequent read operations will return zero bytes and a new file descriptor needs to be opened to read the value again. h](jl)}(hread(2)h]hread(2)}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jkhhhKhj ubj|)}(hhh]h)}(hX{When the count supplied to the read call is shorter than the required length for the digit plus a newline character, subse- quent reads from the same file descriptor will result in com- pleting the string. When a complete string has been read, all subsequent read operations will return zero bytes and a new file descriptor needs to be opened to read the value again.h]hX{When the count supplied to the read call is shorter than the required length for the digit plus a newline character, subse- quent reads from the same file descriptor will result in com- pleting the string. When a complete string has been read, all subsequent read operations will return zero bytes and a new file descriptor needs to be opened to read the value again.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1j{hj ubeh}(h]h ]h"]h$]h&]uh1jehhhKhj ubjf)}(hX$write(2) A write operation on the file results in setting the register to the value given in the string. The string is parsed from the beginning to the first non-numeric character or the end of the buffer. Subsequent writes to the same file descriptor overwrite the previous setting. h](jl)}(hwrite(2)h]hwrite(2)}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jkhhhMhj ubj|)}(hhh]h)}(hXA write operation on the file results in setting the register to the value given in the string. The string is parsed from the beginning to the first non-numeric character or the end of the buffer. Subsequent writes to the same file descriptor overwrite the previous setting.h]hXA write operation on the file results in setting the register to the value given in the string. The string is parsed from the beginning to the first non-numeric character or the end of the buffer. Subsequent writes to the same file descriptor overwrite the previous setting.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1j{hj ubeh}(h]h ]h"]h$]h&]uh1jehhhMhj ubeh}(h]h ]h"]h$]h&]uh1j`hj ubeh}(h]h ]h"]h$]h&]uh1jdhj ubeh}(h]h ]h"]h$]h&]uh1j9hj6ubeh}(h]h ]h"]h$]h&]uh1j4hhhK>hjubeh}(h]h ]h"]h$]h&]uh1hhhhK+hjhhubeh}(h]filesah ]h"]filesah$]h&]uh1hhhhhhhhK)ubh)}(hhh](h)}(hExamplesh]hExamples}(hjV hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjS hhhhhMubh)}(hH/etc/fstab entry none /spu spufs gid=spu 0 0 h]ja)}(hhh]jf)}(hA/etc/fstab entry none /spu spufs gid=spu 0 0 h](jl)}(h/etc/fstab entryh]h/etc/fstab entry}(hjo hhhNhNubah}(h]h ]h"]h$]h&]uh1jkhhhMhjk ubj|)}(hhh]h)}(h.none /spu spufs gid=spu 0 0h]h.none /spu spufs gid=spu 0 0}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj} ubah}(h]h ]h"]h$]h&]uh1j{hjk ubeh}(h]h ]h"]h$]h&]uh1jehhhMhjh ubah}(h]h ]h"]h$]h&]uh1j`hjd ubah}(h]h ]h"]h$]h&]uh1hhhhMhjS hhubeh}(h]examplesah ]h"]examplesah$]h&]uh1hhhhhhhhMubh)}(hhh](h)}(hAuthorsh]hAuthors}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hhhhhM ubh)}(hsArnd Bergmann , Mark Nutter , Ulrich Weigand h]h)}(hrArnd Bergmann , Mark Nutter , Ulrich Weigand h](hArnd Bergmann <}(hj hhhNhNubh reference)}(harndb@de.ibm.comh]harndb@de.ibm.com}(hj hhhNhNubah}(h]h ]h"]h$]h&]refurimailto:arndb@de.ibm.comuh1j hj ubh>, Mark Nutter < }(hj hhhNhNubj )}(hmnutter@us.ibm.comh]hmnutter@us.ibm.com}(hj hhhNhNubah}(h]h ]h"]h$]h&]refurimailto:mnutter@us.ibm.comuh1j hj ubh>, Ulrich Weigand <}(hj hhhNhNubj )}(hUlrich.Weigand@de.ibm.comh]hUlrich.Weigand@de.ibm.com}(hj hhhNhNubah}(h]h ]h"]h$]h&]refuri mailto:Ulrich.Weigand@de.ibm.comuh1j hj ubh>}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhM hj ubah}(h]h ]h"]h$]h&]uh1hhhhM hj hhubeh}(h]authorsah ]h"]authorsah$]h&]uh1hhhhhhhhM ubh)}(hhh](h)}(hSee Alsoh]hSee Also}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hhhhhMubh)}(h>capabilities(7), close(2), spu_create(2), spu_run(2), spufs(7)h]h)}(hj0 h]h>capabilities(7), close(2), spu_create(2), spu_run(2), spufs(7)}(hj2 hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj. ubah}(h]h ]h"]h$]h&]uh1hhhhMhj hhubeh}(h]see-alsoah ]h"]see alsoah$]h&]uh1hhhhhhhhMubeh}(h]spufsah ]h"]spufsah$]h&]uh1hhhhhhhhKubeh}(h]h ]h"]h$]h&]sourcehuh1hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(hN generatorN datestampN source_linkN source_urlN toc_backlinksj<footnote_backlinksK sectnum_xformKstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerjw error_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeenrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourceh _destinationN _config_files]7/var/lib/git/docbuild/linux/Documentation/docutils.confafile_insertion_enabled raw_enabledKline_length_limitM'pep_referencesN pep_base_urlhttps://peps.python.org/pep_file_url_templatepep-%04drfc_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/ tab_widthKtrim_footnote_reference_spacesyntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformKsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_linkenvNubreporterNindirect_targets]substitution_defs}substitution_names}refnames}refids}nameids}(jR jO hhjHjEjjjP jM j j j j jJ jG u nametypes}(jR hjHjjP j j jJ uh}(jO hhhjEhjjKjM jj jS j j jG j u footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}Rparse_messages]transform_messages] transformerN include_log] decorationNhhub.