Copyright © tutorialspoint.com
#include <sys/types.h> #include <sys/spu.h> |
The returned file handle can only be passed to spu_run(2) or closed, other operations are not defined on it. When it is closed, all associated directory entries in spufs 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.
The parameter flags can be zero or any bitwise ord combination of the following constants:
Tag | Description |
---|---|
SPU_RAWIO | |
Allow mapping of some of the hardware registers of the SPU into user space. This flag requires the CAP_SYS_RAWIO capability, see capabilities(7). |
Tag | Description |
---|---|
EACCESS | |
The current user does not have write access on the spufs mount point. | |
EEXIST | An SPU context already exists at the given path name. |
EFAULT | pathname is not a valid string pointer in the current address space. |
EINVAL | pathname is not a directory in the spufs mount point. |
ELOOP | Too many symlinks were found while resolving pathname. |
EMFILE | The process has reached its maximum open file limit. |
ENAMETOOLONG | |
pathname was too long. | |
ENFILE | The system has reached the global open file limit. |
ENOENT | Part of pathname could not be resolved. |
ENOMEM | The kernel could not allocate all resources required. |
ENOSPC | 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. |
ENOSYS | the functionality is not provided by the current system, because either the hardware does not provide SPUs or the spufs module is not loaded. |
ENOTDIR | |
A part of pathname is not a directory. |
Copyright © tutorialspoint.com