wut
v1.7.0
Wii U Toolchain
|
Standard condition variable implementation. More...
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... | |
Standard condition variable implementation.
Similar to std::condition_variable.
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. |
#define OS_CONDITION_TAG 0x634E6456u |
Definition at line 22 of file condition.h.
typedef struct OSCondition OSCondition |
Definition at line 1 of file condition.h.
Definition at line 1 of file condition.h.
void OSInitCond | ( | OSCondition * | condition | ) |
Initialise a condition variable structure.
void OSInitCondEx | ( | OSCondition * | condition, |
const char * | name | ||
) |
Initialise a condition variable structure with a name.
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.
void OSSignalCond | ( | OSCondition * | condition | ) |
Will wake up any threads waiting on the condition with OSWaitCond.
Similar to std::condition_variable::notify_all.