WUT  0.1
Wii U Toolchain
Data Structures | Macros | Typedefs | Enumerations | Functions
Thread

Data Structures

struct  OSContext
 
struct  OSMutexQueue
 
struct  OSFastMutexQueue
 
struct  OSThread
 

Macros

#define OS_CONTEXT_TAG   0x4F53436F6E747874ull
 
#define OS_THREAD_TAG   0x74487244u
 

Typedefs

typedef struct OSContext OSContext
 
typedef struct OSFastMutex OSFastMutex
 
typedef struct OSFastMutexQueue OSFastMutexQueue
 
typedef struct OSMutex OSMutex
 
typedef struct OSMutexQueue OSMutexQueue
 
typedef struct OSThread OSThread
 
typedef uint8_t OSThreadState
 
typedef uint32_t OSThreadRequest
 
typedef uint8_t OSThreadAttributes
 
typedef int(* OSThreadEntryPointFn) (int argc, const char **argv)
 
typedef void(* OSThreadCleanupCallbackFn) (OSThread *thread, void *stack)
 
typedef void(* OSThreadDeallocatorFn) (OSThread *thread, void *stack)
 

Enumerations

enum  OSThreadState {
  OS_THREAD_STATE_NONE = 0, OS_THREAD_STATE_READY = 1 << 0, OS_THREAD_STATE_RUNNING = 1 << 1, OS_THREAD_STATE_WAITING = 1 << 2,
  OS_THREAD_STATE_MORIBUND = 1 << 3
}
 
enum  OSThreadRequest { OS_THREAD_REQUEST_NONE = 0, OS_THREAD_REQUEST_SUSPEND = 1, OS_THREAD_REQUEST_CANCEL = 2 }
 
enum  OSThreadAttributes {
  OS_THREAD_ATTRIB_AFFINITY_CPU0 = 1 << 0, OS_THREAD_ATTRIB_AFFINITY_CPU1 = 1 << 1, OS_THREAD_ATTRIB_AFFINITY_CPU2 = 1 << 2, OS_THREAD_ATTRIB_AFFINITY_ANY = 1 << 3,
  OS_THREAD_ATTRIB_DETACHED = 1 << 4
}
 

Functions

void OSCancelThread (OSThread *thread)
 
int32_t OSCheckActiveThreads ()
 
int32_t OSCheckThreadStackUsage (OSThread *thread)
 
void OSClearThreadStackUsage (OSThread *thread)
 
void OSContinueThread (OSThread *thread)
 
BOOL OSCreateThread (OSThread *thread, OSThreadEntryPointFn entry, int32_t argc, char *argv, void *stack, uint32_t stackSize, int32_t priority, OSThreadAttributes attributes)
 
void OSDetachThread (OSThread *thread)
 
void OSExitThread (int32_t result)
 
void OSGetActiveThreadLink (OSThread *thread, OSThreadLink *link)
 
OSThreadOSGetCurrentThread ()
 
OSThreadOSGetDefaultThread (uint32_t coreID)
 
uint32_t OSGetStackPointer ()
 
uint32_t OSGetThreadAffinity (OSThread *thread)
 
const char * OSGetThreadName (OSThread *thread)
 
int32_t OSGetThreadPriority (OSThread *thread)
 
uint32_t OSGetThreadSpecific (uint32_t id)
 
BOOL OSIsThreadSuspended (OSThread *thread)
 
BOOL OSIsThreadTerminated (OSThread *thread)
 
BOOL OSJoinThread (OSThread *thread, int *threadResult)
 
void OSPrintCurrentThreadState ()
 
int32_t OSResumeThread (OSThread *thread)
 
BOOL OSRunThread (OSThread *thread, OSThreadEntryPointFn entry, int argc, const char **argv)
 
BOOL OSSetThreadAffinity (OSThread *thread, uint32_t affinity)
 
BOOL OSSetThreadCancelState (BOOL state)
 
OSThreadCleanupCallbackFn OSSetThreadCleanupCallback (OSThread *thread, OSThreadCleanupCallbackFn callback)
 
OSThreadDeallocatorFn OSSetThreadDeallocator (OSThread *thread, OSThreadDeallocatorFn deallocator)
 
void OSSetThreadName (OSThread *thread, const char *name)
 
BOOL OSSetThreadPriority (OSThread *thread, int32_t priority)
 
BOOL OSSetThreadRunQuantum (OSThread *thread, uint32_t quantum)
 
void OSSetThreadSpecific (uint32_t id, uint32_t value)
 
BOOL OSSetThreadStackUsage (OSThread *thread)
 
void OSSleepThread (OSThreadQueue *queue)
 
void OSSleepTicks (OSTime ticks)
 
uint32_t OSSuspendThread (OSThread *thread)
 
void OSTestThreadCancel ()
 
void OSWakeupThread (OSThreadQueue *queue)
 
void OSYieldThread ()
 

Detailed Description

Macro Definition Documentation

#define OS_CONTEXT_TAG   0x4F53436F6E747874ull

Definition at line 56 of file thread.h.

#define OS_THREAD_TAG   0x74487244u

Definition at line 133 of file thread.h.

Typedef Documentation

typedef struct OSContext OSContext

Definition at line 16 of file thread.h.

typedef struct OSFastMutex OSFastMutex

Definition at line 17 of file thread.h.

Definition at line 18 of file thread.h.

typedef struct OSMutex OSMutex

Definition at line 19 of file thread.h.

typedef struct OSMutexQueue OSMutexQueue

Definition at line 20 of file thread.h.

typedef struct OSThread OSThread

Definition at line 21 of file thread.h.

typedef uint8_t OSThreadAttributes

Definition at line 25 of file thread.h.

typedef void(* OSThreadCleanupCallbackFn) (OSThread *thread, void *stack)

Definition at line 28 of file thread.h.

typedef void(* OSThreadDeallocatorFn) (OSThread *thread, void *stack)

Definition at line 29 of file thread.h.

typedef int(* OSThreadEntryPointFn) (int argc, const char **argv)

Definition at line 27 of file thread.h.

typedef uint32_t OSThreadRequest

Definition at line 24 of file thread.h.

typedef uint8_t OSThreadState

Definition at line 23 of file thread.h.

Enumeration Type Documentation

Enumerator
OS_THREAD_ATTRIB_AFFINITY_CPU0 
OS_THREAD_ATTRIB_AFFINITY_CPU1 
OS_THREAD_ATTRIB_AFFINITY_CPU2 
OS_THREAD_ATTRIB_AFFINITY_ANY 
OS_THREAD_ATTRIB_DETACHED 

Definition at line 47 of file thread.h.

Enumerator
OS_THREAD_REQUEST_NONE 
OS_THREAD_REQUEST_SUSPEND 
OS_THREAD_REQUEST_CANCEL 

Definition at line 40 of file thread.h.

Enumerator
OS_THREAD_STATE_NONE 
OS_THREAD_STATE_READY 
OS_THREAD_STATE_RUNNING 
OS_THREAD_STATE_WAITING 
OS_THREAD_STATE_MORIBUND 

Definition at line 31 of file thread.h.

Function Documentation

void OSCancelThread ( OSThread thread)
int32_t OSCheckActiveThreads ( )
int32_t OSCheckThreadStackUsage ( OSThread thread)
void OSClearThreadStackUsage ( OSThread thread)
void OSContinueThread ( OSThread thread)
BOOL OSCreateThread ( OSThread thread,
OSThreadEntryPointFn  entry,
int32_t  argc,
char *  argv,
void *  stack,
uint32_t  stackSize,
int32_t  priority,
OSThreadAttributes  attributes 
)
void OSDetachThread ( OSThread thread)
void OSExitThread ( int32_t  result)
void OSGetActiveThreadLink ( OSThread thread,
OSThreadLink link 
)
OSThread* OSGetCurrentThread ( )
OSThread* OSGetDefaultThread ( uint32_t  coreID)
uint32_t OSGetStackPointer ( )
uint32_t OSGetThreadAffinity ( OSThread thread)
const char* OSGetThreadName ( OSThread thread)
int32_t OSGetThreadPriority ( OSThread thread)
uint32_t OSGetThreadSpecific ( uint32_t  id)
BOOL OSIsThreadSuspended ( OSThread thread)
BOOL OSIsThreadTerminated ( OSThread thread)
BOOL OSJoinThread ( OSThread thread,
int *  threadResult 
)
void OSPrintCurrentThreadState ( )
int32_t OSResumeThread ( OSThread thread)
BOOL OSRunThread ( OSThread thread,
OSThreadEntryPointFn  entry,
int  argc,
const char **  argv 
)
BOOL OSSetThreadAffinity ( OSThread thread,
uint32_t  affinity 
)
BOOL OSSetThreadCancelState ( BOOL  state)
OSThreadCleanupCallbackFn OSSetThreadCleanupCallback ( OSThread thread,
OSThreadCleanupCallbackFn  callback 
)
OSThreadDeallocatorFn OSSetThreadDeallocator ( OSThread thread,
OSThreadDeallocatorFn  deallocator 
)
void OSSetThreadName ( OSThread thread,
const char *  name 
)
BOOL OSSetThreadPriority ( OSThread thread,
int32_t  priority 
)
BOOL OSSetThreadRunQuantum ( OSThread thread,
uint32_t  quantum 
)
void OSSetThreadSpecific ( uint32_t  id,
uint32_t  value 
)
BOOL OSSetThreadStackUsage ( OSThread thread)
void OSSleepThread ( OSThreadQueue queue)
void OSSleepTicks ( OSTime  ticks)
uint32_t OSSuspendThread ( OSThread thread)
void OSTestThreadCancel ( )
void OSWakeupThread ( OSThreadQueue queue)
void OSYieldThread ( )