Loading [MathJax]/extensions/tex2jax.js
Twilight Princess
Decompilation of The Legend of Zelda: Twilight Princess
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Modules Pages
OSThread.c File Reference

Functions

static void OSInitMutexQueue (OSMutexQueue *queue)
 
static void __OSSwitchThread (OSThread *nextThread)
 
static int __OSIsThreadActive (OSThread *thread)
 
static void SetRun (OSThread *thread)
 
static void UnsetRun (OSThread *thread)
 
static OSThreadSetEffectivePriority (OSThread *thread, s32 priority)
 
static void UpdatePriority (OSThread *thread)
 
static OSThreadSelectThread (int yield)
 
static int CheckThreadQueue (OSThreadQueue *queue)
 
static int IsMember (OSThreadQueue *queue, OSThread *thread)
 
static void OSSetCurrentThread (OSThread *thread)
 
static void DefaultSwitchThreadCallback (OSThread *from, OSThread *to)
 
OSSwitchThreadCallback OSSetSwitchThreadCallback (OSSwitchThreadCallback callback)
 
void __OSThreadInit ()
 
void OSInitThreadQueue (OSThreadQueue *queue)
 
OSThreadOSGetCurrentThread ()
 
BOOL OSIsThreadSuspended (OSThread *thread)
 
BOOL OSIsThreadTerminated (OSThread *thread)
 
s32 OSDisableScheduler (void)
 
s32 OSEnableScheduler (void)
 
s32 __OSGetEffectivePriority (OSThread *thread)
 
void __OSPromoteThread (OSThread *thread, s32 priority)
 
void __OSReschedule (void)
 
void OSYieldThread (void)
 
int OSCreateThread (OSThread *thread, void *(*func)(void *), void *param, void *stack, u32 stackSize, OSPriority priority, u16 attr)
 
void OSExitThread (void *val)
 
void OSCancelThread (OSThread *thread)
 
int OSJoinThread (OSThread *thread, void *val)
 
void OSDetachThread (OSThread *thread)
 
s32 OSResumeThread (OSThread *thread)
 
s32 OSSuspendThread (OSThread *thread)
 
void OSSleepThread (OSThreadQueue *queue)
 
void OSWakeupThread (OSThreadQueue *queue)
 
int OSSetThreadPriority (OSThread *thread, s32 priority)
 
s32 OSGetThreadPriority (OSThread *thread)
 
OSThreadOSSetIdleFunction (OSIdleFunction idleFunction, void *param, void *stack, u32 stackSize)
 
OSThreadOSGetIdleFunction (void)
 
s32 OSCheckActiveThreads (void)
 
void OSClearStack (u8 val)
 
void OSSetThreadSpecific (s32 index, void *ptr)
 
void * OSGetThreadSpecific (s32 index)
 
u8 Debug_BBA_804516D0 ALIGN_DECL (8)
 

Variables

u8 _stack_end []
 
u8 _stack_addr []
 
static OSThreadQueue RunQueue [32]
 
static OSThread IdleThread
 
static OSThread DefaultThread
 
static OSContext IdleContext
 
static volatile u32 RunQueueBits
 
static volatile int RunQueueHint
 
static s32 Reschedule
 
static OSSwitchThreadCallback SwitchThreadCallback = DefaultSwitchThreadCallback
 
u8 Debug_BBA_804516D0
 

Function Documentation

◆ __OSGetEffectivePriority()

s32 __OSGetEffectivePriority ( OSThread * thread)

◆ __OSIsThreadActive()

static BOOL __OSIsThreadActive ( OSThread * thread)
static

◆ __OSPromoteThread()

void __OSPromoteThread ( OSThread * thread,
s32 priority )

◆ __OSReschedule()

void __OSReschedule ( void )

◆ __OSSwitchThread()

static void __OSSwitchThread ( OSThread * nextThread)
static

◆ __OSThreadInit()

void __OSThreadInit ( void )

◆ ALIGN_DECL()

u8 Debug_BBA_804516D0 ALIGN_DECL ( 8 )

◆ CheckThreadQueue()

static int CheckThreadQueue ( OSThreadQueue * queue)
static

◆ DefaultSwitchThreadCallback()

static void DefaultSwitchThreadCallback ( OSThread * from,
OSThread * to )
static

◆ IsMember()

static BOOL IsMember ( OSThreadQueue * queue,
OSThread * thread )
static

◆ OSCancelThread()

void OSCancelThread ( OSThread * thread)

◆ OSCheckActiveThreads()

s32 OSCheckActiveThreads ( void )

◆ OSClearStack()

void OSClearStack ( u8 val)

◆ OSCreateThread()

int OSCreateThread ( OSThread * thread,
void *(* func )(void *),
void * param,
void * stack,
u32 stackSize,
OSPriority priority,
u16 attr )

◆ OSDetachThread()

void OSDetachThread ( OSThread * thread)

◆ OSDisableScheduler()

s32 OSDisableScheduler ( void )

◆ OSEnableScheduler()

s32 OSEnableScheduler ( void )

◆ OSExitThread()

void OSExitThread ( void * val)

◆ OSGetCurrentThread()

OSThread * OSGetCurrentThread ( void )

◆ OSGetIdleFunction()

OSThread * OSGetIdleFunction ( void )

◆ OSGetThreadPriority()

s32 OSGetThreadPriority ( OSThread * thread)

◆ OSGetThreadSpecific()

void * OSGetThreadSpecific ( s32 index)

◆ OSInitMutexQueue()

static void OSInitMutexQueue ( OSMutexQueue * queue)
static

◆ OSInitThreadQueue()

void OSInitThreadQueue ( OSThreadQueue * queue)

◆ OSIsThreadSuspended()

BOOL OSIsThreadSuspended ( OSThread * thread)

◆ OSIsThreadTerminated()

BOOL OSIsThreadTerminated ( OSThread * thread)

◆ OSJoinThread()

int OSJoinThread ( OSThread * thread,
void * val )

◆ OSResumeThread()

s32 OSResumeThread ( OSThread * thread)

◆ OSSetCurrentThread()

static void OSSetCurrentThread ( OSThread * thread)
inlinestatic

◆ OSSetIdleFunction()

OSThread * OSSetIdleFunction ( OSIdleFunction idleFunction,
void * param,
void * stack,
u32 stackSize )

◆ OSSetSwitchThreadCallback()

OSSwitchThreadCallback OSSetSwitchThreadCallback ( OSSwitchThreadCallback callback)

◆ OSSetThreadPriority()

int OSSetThreadPriority ( OSThread * thread,
s32 priority )

◆ OSSetThreadSpecific()

void OSSetThreadSpecific ( s32 index,
void * ptr )

◆ OSSleepThread()

void OSSleepThread ( OSThreadQueue * queue)

◆ OSSuspendThread()

s32 OSSuspendThread ( OSThread * thread)

◆ OSWakeupThread()

void OSWakeupThread ( OSThreadQueue * queue)

◆ OSYieldThread()

void OSYieldThread ( void )

◆ SelectThread()

static OSThread * SelectThread ( int yield)
static

◆ SetEffectivePriority()

static OSThread * SetEffectivePriority ( OSThread * thread,
s32 priority )
static

◆ SetRun()

static void SetRun ( OSThread * thread)
static

◆ UnsetRun()

static void UnsetRun ( OSThread * thread)
static

◆ UpdatePriority()

static void UpdatePriority ( OSThread * thread)
static

Variable Documentation

◆ _stack_addr

u8 _stack_addr[]
extern

◆ _stack_end

u8 _stack_end[]
extern

◆ Debug_BBA_804516D0

u8 Debug_BBA_804516D0
extern

◆ DefaultThread

OSThread DefaultThread
static

◆ IdleContext

OSContext IdleContext
static

◆ IdleThread

OSThread IdleThread
static

◆ Reschedule

s32 Reschedule
static

◆ RunQueue

OSThreadQueue RunQueue[32]
static

◆ RunQueueBits

volatile u32 RunQueueBits
static

◆ RunQueueHint

volatile int RunQueueHint
static

◆ SwitchThreadCallback

OSSwitchThreadCallback SwitchThreadCallback = DefaultSwitchThreadCallback
static