Section: Linux Programmer's Manual (2)
Return to Main Contents
spu_run - execute an spu context
int spu_run(int fd, unsigned int *npc,
unsigned int *event);
system call is used on PowerPC machines that implement the
Cell Broadband Engine Architecture in order to access Synergistic
Processor Units (SPUs). It uses the
that was returned from
to address a specific SPU context. When the context gets scheduled
to a physical SPU, it starts execution at the instruction pointer
Execution of SPU code happens synchronously, meaning that
does not return while the SPU is still running. If there is a need
to execute SPU code in parallel with other code on either the
main CPU or other SPUs, you need to create a new thread of execution
first, e.g. using the
returns, the current value of the SPU instruction pointer is written
so you can call
again without updating the pointers.
can be a NULL pointer or point to an extended status code that gets
returns. It can be one of the following constants:
A DMA alignment error
A DMA segmentation error
A DMA storage error
is passed as the
argument, these errors will result in a signal delivered to
the calling process.
returns the value of the
register or -1 to indicate an error and set errno to one
of the error codes listed below.
register value contains a bit mask of status codes and
optionally a 14 bit code returned from the
instruction on the SPU. The bit masks for the status codes
SPU was stopped by
SPU was stopped by
SPU is waiting for a channel.
SPU is in single-step mode.
SPU has tried to execute an invalid instruction.
SPU has tried to access an invalid channel.
The bits masked with this value contain the code returned from
There are always one or more of the lower eight bits set or an
error code is returned from
- EAGAIN or EWOULDBLOCK
is in non-blocking mode and
is not a valid file descriptor.
is not a valid pointer or
is neither NULL nor a valid pointer.
A signal occured while
was in progress. The
value has been updated to the new program counter value if
is not a file descriptor returned from
Insufficient memory was available to handle a page fault
resulting from an MFC direct memory access.
the functionality is not provided by the current system, because
either the hardware does not provide SPUs or the
module is not loaded.
is meant to be used from libraries that implement a more abstract
interface to SPUs, not to be used from regular applications.
See http://www.bsc.es/projects/deepcomputing/linuxoncell/ for
the recommended libraries.
This call is Linux specific and only implemented by the ppc64
architecture. Programs using this system call are not portable.
The code does not yet fully implement all features lined out here.
Arnd Bergmann <email@example.com>
- RETURN VALUE
- CONFORMING TO
- SEE ALSO
linux.jgfs.net manual pages