PPU thread syscalls.
More...
#include <ppu-lv2.h>
#include <lv2/thread.h>
Go to the source code of this file.
|
s32 | sysThreadCreate (sys_ppu_thread_t *threadid, void(*entry)(void *), void *arg, s32 priority, u64 stacksize, u64 flags, char *threadname) |
| Create a PPU thread. More...
|
|
LV2_SYSCALL | sysThreadJoin (sys_ppu_thread_t threadid, u64 *retval) |
| Wait for the termination of a joinable PPU thread. More...
|
|
LV2_SYSCALL | sysThreadYield () |
| Preempt the calling PPU thread. More...
|
|
LV2_SYSCALL | sysThreadDetach (sys_ppu_thread_t threadid) |
| Make a PPU thread detached (non-joinable). More...
|
|
LV2_SYSCALL | sysThreadJoinState (s32 *joinable) |
| Test the joinable or detached state of the calling PPU thread. More...
|
|
LV2_SYSCALL | sysThreadSetPriority (sys_ppu_thread_t threadid, s32 prio) |
| Set the priority of a PPU thread. More...
|
|
LV2_SYSCALL | sysThreadGetPriority (sys_ppu_thread_t threadid, s32 *prio) |
| Get the priority of a PPU thread. More...
|
|
LV2_SYSCALL | sysThreadRename (sys_ppu_thread_t threadid, const char *name) |
| Rename a PPU thread. More...
|
|
LV2_SYSCALL | sysThreadRecoverPageFault (sys_ppu_thread_t threadid) |
| Recover a PPU thread after a page fault. More...
|
|
LV2_SYSCALL | sysThreadGetStackInformation (sys_ppu_thread_stack_t *info) |
| Get stack information from the current PPU thread. More...
|
|
◆ sysThreadCreate()
s32 sysThreadCreate |
( |
sys_ppu_thread_t * |
threadid, |
|
|
void(*)(void *) |
entry, |
|
|
void * |
arg, |
|
|
s32 |
priority, |
|
|
u64 |
stacksize, |
|
|
u64 |
flags, |
|
|
char * |
threadname |
|
) |
| |
Create a PPU thread.
- Parameters
-
threadid | Pointer to storage for the thread id. |
entry | Pointer to the thread's main function. |
arg | Argument for the thread's main function. |
priority | Thread priority (0: highest) |
stacksize | Stack size in bytes. |
flags | Thread flags. |
The value is either 0 or THREAD_JOINABLE.
- Parameters
-
threadname | The thread name. |
- Returns
- zero if no error occured, nonzero otherwise.
◆ sysThreadDetach()
LV2_SYSCALL sysThreadDetach |
( |
sys_ppu_thread_t |
threadid | ) |
|
Make a PPU thread detached (non-joinable).
- Parameters
-
- Returns
- zero if no error occured, nonzero otherwise.
◆ sysThreadGetPriority()
LV2_SYSCALL sysThreadGetPriority |
( |
sys_ppu_thread_t |
threadid, |
|
|
s32 * |
prio |
|
) |
| |
Get the priority of a PPU thread.
- Parameters
-
threadid | The thread id. |
prio | Pointer to storage for the current priority. |
- Returns
- zero if no error occured, nonzero otherwise.
◆ sysThreadGetStackInformation()
Get stack information from the current PPU thread.
- Parameters
-
info | Pointer to storage for the stack information. |
- Returns
- zero if no error occured, nonzero otherwise.
◆ sysThreadJoin()
LV2_SYSCALL sysThreadJoin |
( |
sys_ppu_thread_t |
threadid, |
|
|
u64 * |
retval |
|
) |
| |
Wait for the termination of a joinable PPU thread.
- Parameters
-
threadid | The thread id. |
retval | Pointer to storage for the thread's returned value. |
- Returns
- zero if no error occured, nonzero otherwise.
◆ sysThreadJoinState()
LV2_SYSCALL sysThreadJoinState |
( |
s32 * |
joinable | ) |
|
Test the joinable or detached state of the calling PPU thread.
- Parameters
-
joinable | Pointer to storage for the joinable state (0: detached, 1: joinable) |
- Returns
- zero if no error occured, nonzero otherwise.
◆ sysThreadRecoverPageFault()
LV2_SYSCALL sysThreadRecoverPageFault |
( |
sys_ppu_thread_t |
threadid | ) |
|
Recover a PPU thread after a page fault.
- Parameters
-
- Returns
- zero if no error occured, nonzero otherwise.
◆ sysThreadRename()
LV2_SYSCALL sysThreadRename |
( |
sys_ppu_thread_t |
threadid, |
|
|
const char * |
name |
|
) |
| |
Rename a PPU thread.
- Parameters
-
threadid | The thread id. |
name | The new name. |
- Returns
- zero if no error occured, nonzero otherwise.
◆ sysThreadSetPriority()
LV2_SYSCALL sysThreadSetPriority |
( |
sys_ppu_thread_t |
threadid, |
|
|
s32 |
prio |
|
) |
| |
Set the priority of a PPU thread.
- Parameters
-
threadid | The thread id. |
prio | The new priority. |
- Returns
- zero if no error occured, nonzero otherwise.
◆ sysThreadYield()
LV2_SYSCALL sysThreadYield |
( |
| ) |
|
Preempt the calling PPU thread.
- Returns
- zero if no error occured, nonzero otherwise.