Section: Linux Programmer's Manual (2)
Return to Main Contents
spu_create - create a new spu context
int spu_create(const char *pathname, int flags, mode_t mode);
system call is used on PowerPC machines that implement the
Cell Broadband Engine Architecture in order to access Synergistic
Processor Units (SPUs). It creates a new logical context for an
and returns a handle to associated with it.
must point to a non-existing directory in the mount point of the
SPU file system
is successful, a directory gets created on
and it is populated with files.
The returned file handle can only be passed to
or closed, other operations are not defined on it. When it is closed,
all associated directory entries in
are removed. When the last file handle pointing either inside of the
context directory or to this file descriptor is closed, the logical
SPU context is destroyed.
can be zero or any bitwise or'd combination of the following constants:
Allow mapping of some of the hardware registers of the SPU into user
space. This flag requires the
parameter specifies the permissions used for creating the new
directory in spufs.
is modified with the user's
value and then used for both the directory and the files
contained in it. The file permissions mask out some more bits
because they typically support only read or write access. See
for a full list of the possible
spu_create returns a new file descriptor. It may return -1 to
indicate an error condition and set errno to one of the error
codes listed below.
The current user does not have write access on the
An SPU context already exists at the given path name.
is not a valid string pointer in the current address space.
is not a directory in the
Too many symlinks were found while resolving
The process has reached its maximum open file limit.
was too long.
The system has reached the global open file limit.
could not be resolved.
The kernel could not allocate all resources required.
There are not enough SPU resources available to create
a new context or the user specific limit for the number
of SPU contexts has been reached.
the functionality is not provided by the current system, because
either the hardware does not provide SPUs or the
module is not loaded.
A part of
is not a directory.
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.
must point to a location beneath the mount point of
By convention, it gets mounted in
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 <firstname.lastname@example.org>
- RETURN VALUE
- CONFORMING TO
- SEE ALSO
linux.jgfs.net manual pages