44 #define LWP_SUCCESSFUL 0 45 #define LWP_ALREADY_SUSPENDED 1 46 #define LWP_NOT_SUSPENDED 2 48 #define LWP_PRIO_IDLE 0 49 #define LWP_PRIO_HIGHEST 127 51 #define LWP_THREAD_NULL 0xffffffff 52 #define LWP_TQUEUE_NULL 0xffffffff s32 LWP_ThreadSleep(lwpq_t thequeue)
Pushes the current thread onto the given thread synchronization queue and sets the thread state to bl...
Definition: lwp.c:369
int32_t s32
32bit signed integer
Definition: gctypes.h:24
void LWP_YieldThread()
Yield the current thread to another one with higher priority or if not running at the same priority w...
Definition: lwp.c:276
BOOL LWP_ThreadIsSuspended(lwp_t thethread)
Test whether the given thread is suspended or not.
Definition: lwp.c:290
s32 LWP_InitQueue(lwpq_t *thequeue)
Initialize the thread synchronization queue.
Definition: lwp.c:335
s32 LWP_CreateThread(lwp_t *thethread, void *(*entry)(void *), void *arg, void *stackbase, u32 stack_size, u8 prio)
Definition: lwp.c:190
void LWP_Reschedule(u32 prio)
Reschedule all threads running at the given priority.
Definition: lwp.c:283
s32 LWP_SuspendThread(lwp_t thethread)
Suspend the given thread.
Definition: lwp.c:220
u32 lwp_t
typedef for the thread context handle
Definition: lwp.h:62
s32 LWP_JoinThread(lwp_t thethread, void **value_ptr)
Join the given thread.
Definition: lwp.c:305
void LWP_CloseQueue(lwpq_t thequeue)
Close the thread synchronization queue and releas the handle.
Definition: lwp.c:352
u32 lwpq_t
typedef for the thread queue's context handle
Definition: lwp.h:68
lwp_t LWP_GetSelf()
Return the handle to the current thread.
Definition: lwp.c:252
s32 LWP_ResumeThread(lwp_t thethread)
Resume the given thread.
Definition: lwp.c:236
void LWP_ThreadBroadcast(lwpq_t thequeue)
Removes all blocked threads from the thread synchronization queue and sets them back to running state...
Definition: lwp.c:392
unsigned int BOOL
Definition: gctypes.h:51
void LWP_ThreadSignal(lwpq_t thequeue)
Signals one thread to be revmoved from the thread synchronization queue and sets it back to running s...
Definition: lwp.c:406
void LWP_SetThreadPriority(lwp_t thethread, u32 prio)
Set the priority of the given thread.
Definition: lwp.c:263
uint8_t u8
8bit unsigned integer
Definition: gctypes.h:17
uint32_t u32
32bit unsigned integer
Definition: gctypes.h:19