wut  v1.7.0
Wii U Toolchain
Data Structures | Macros | Typedefs | Functions
Condition Variable

Standard condition variable implementation. More...

Collaboration diagram for Condition Variable:

Data Structures

struct  OSCondition
 

Macros

#define OS_CONDITION_TAG   0x634E6456u
 

Typedefs

typedef struct OSCondition OSCondition
 
typedef struct OSMutex OSMutex
 

Functions

void OSInitCond (OSCondition *condition)
 Initialise a condition variable structure. More...
 
void OSInitCondEx (OSCondition *condition, const char *name)
 Initialise a condition variable structure with a name. More...
 
void OSWaitCond (OSCondition *condition, OSMutex *mutex)
 Sleep the current thread until the condition variable has been signalled. More...
 
void OSSignalCond (OSCondition *condition)
 Will wake up any threads waiting on the condition with OSWaitCond. More...
 

Detailed Description

Standard condition variable implementation.

Similar to std::condition_variable.


Data Structure Documentation

◆ OSCondition

struct OSCondition

Definition at line 24 of file condition.h.

Data Fields
uint32_t tag Should always be set to the value OS_CONDITION_TAG.
const char * name Name set by OSInitCondEx.
OSThreadQueue queue Queue of threads currently waiting on condition with OSWaitCond.

Macro Definition Documentation

◆ OS_CONDITION_TAG

#define OS_CONDITION_TAG   0x634E6456u

Definition at line 22 of file condition.h.

Typedef Documentation

◆ OSCondition

typedef struct OSCondition OSCondition

Definition at line 1 of file condition.h.

◆ OSMutex

typedef struct OSMutex OSMutex

Definition at line 1 of file condition.h.

Function Documentation

◆ OSInitCond()

void OSInitCond ( OSCondition condition)

Initialise a condition variable structure.

◆ OSInitCondEx()

void OSInitCondEx ( OSCondition condition,
const char *  name 
)

Initialise a condition variable structure with a name.

◆ OSWaitCond()

void OSWaitCond ( OSCondition condition,
OSMutex mutex 
)

Sleep the current thread until the condition variable has been signalled.

The mutex must be locked when entering this function. Will unlock the mutex and then sleep, reacquiring the mutex when woken.

Similar to std::condition_variable::wait.

◆ OSSignalCond()

void OSSignalCond ( OSCondition condition)

Will wake up any threads waiting on the condition with OSWaitCond.

Similar to std::condition_variable::notify_all.