5 #ifndef __SYS_THREAD_H__ 6 #define __SYS_THREAD_H__ 12 #define THREAD_JOINABLE 1 15 #define THREAD_INTERRUPT 2 39 s32
sysThreadCreate(sys_ppu_thread_t *threadid,
void (*entry)(
void *),
void *arg,s32 priority,u64 stacksize,u64 flags,
char *threadname);
48 lv2syscall2(44,threadid,(u64)retval);;
49 return_to_user_prog(s32);
58 return_to_user_prog(s32);
67 lv2syscall1(45,threadid);
68 return_to_user_prog(s32);
78 lv2syscall1(46,(u64)joinable);
79 return_to_user_prog(s32);
89 lv2syscall2(47,threadid,prio);
90 return_to_user_prog(s32);
100 lv2syscall2(48,threadid,(u64)prio);
101 return_to_user_prog(s32);
111 lv2syscall2(56,threadid,(u64)name);
112 return_to_user_prog(s32);
121 lv2syscall1(57,threadid);
122 return_to_user_prog(s32);
131 struct _sys_ppu_thread_stack_t_32 {
136 lv2syscall1(49,(u64)(&info32));
137 info->
addr = (
void*)((u64)info32.addr);
138 info->
size = info32.size;
140 return_to_user_prog(s32);
LV2_SYSCALL sysThreadJoin(sys_ppu_thread_t threadid, u64 *retval)
Wait for the termination of a joinable PPU thread.
Definition: thread.h:46
PPU thread stack data structure.
Definition: thread.h:22
LV2_SYSCALL sysThreadGetStackInformation(sys_ppu_thread_stack_t *info)
Get stack information from the current PPU thread.
Definition: thread.h:129
LV2_SYSCALL sysThreadSetPriority(sys_ppu_thread_t threadid, s32 prio)
Set the priority of a PPU thread.
Definition: thread.h:87
LV2_SYSCALL sysThreadJoinState(s32 *joinable)
Test the joinable or detached state of the calling PPU thread.
Definition: thread.h:76
s32 sysThreadCreate(sys_ppu_thread_t *threadid, void(*entry)(void *), void *arg, s32 priority, u64 stacksize, u64 flags, char *threadname)
Create a PPU thread.
LV2_SYSCALL sysThreadYield()
Preempt the calling PPU thread.
Definition: thread.h:55
LV2_SYSCALL sysThreadRename(sys_ppu_thread_t threadid, const char *name)
Rename a PPU thread.
Definition: thread.h:109
LV2_SYSCALL sysThreadGetPriority(sys_ppu_thread_t threadid, s32 *prio)
Get the priority of a PPU thread.
Definition: thread.h:98
u32 size
stack size in bytes
Definition: thread.h:24
struct _sys_ppu_thread_stack_t sys_ppu_thread_stack_t
PPU thread stack data structure.
void * addr
pointer to the stack buffer
Definition: thread.h:23
LV2_SYSCALL sysThreadRecoverPageFault(sys_ppu_thread_t threadid)
Recover a PPU thread after a page fault.
Definition: thread.h:119
LV2_SYSCALL sysThreadDetach(sys_ppu_thread_t threadid)
Make a PPU thread detached (non-joinable).
Definition: thread.h:65