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

Data Structures

struct  OSEvent
 

Macros

#define OS_EVENT_TAG   0x65566E54u
 

Typedefs

typedef struct OSEvent OSEvent
 
typedef uint32_t OSEventMode
 

Enumerations

enum  OSEventMode { OS_EVENT_MODE_MANUAL = 0, OS_EVENT_MODE_AUTO = 1 }
 

Functions

void OSInitEvent (OSEvent *event, BOOL value, OSEventMode mode)
 
void OSInitEventEx (OSEvent *event, BOOL value, OSEventMode mode, char *name)
 
void OSSignalEvent (OSEvent *event)
 
void OSSignalEventAll (OSEvent *event)
 
void OSWaitEvent (OSEvent *event)
 
void OSResetEvent (OSEvent *event)
 
BOOL OSWaitEventWithTimeout (OSEvent *event, OSTime timeout)
 

Detailed Description

Standard event object implementation. There are two supported event object modes, check OSEventMode.

Similar to Windows Event Objects.

Macro Definition Documentation

#define OS_EVENT_TAG   0x65566E54u

Definition at line 32 of file event.h.

Typedef Documentation

typedef struct OSEvent OSEvent

Definition at line 20 of file event.h.

typedef uint32_t OSEventMode

Definition at line 21 of file event.h.

Enumeration Type Documentation

Enumerator
OS_EVENT_MODE_MANUAL 

A manual event will only reset when OSResetEvent is called.

OS_EVENT_MODE_AUTO 

An auto event will reset everytime a thread is woken.

Definition at line 23 of file event.h.

Function Documentation

void OSInitEvent ( OSEvent event,
BOOL  value,
OSEventMode  mode 
)

Initialise an event object with value and mode.

void OSInitEventEx ( OSEvent event,
BOOL  value,
OSEventMode  mode,
char *  name 
)

Initialise an event object with value, mode and name.

void OSResetEvent ( OSEvent event)

Resets the event object.

Similar to ResetEvent.

void OSSignalEvent ( OSEvent event)

Signals the event.

If no threads are waiting the event value is set.

If the event mode is OS_EVENT_MODE_MANUAL this will wake all waiting threads and the event will remain set until OSResetEvent is called.

If the event mode is OS_EVENT_MODE_AUTO this will wake only one thread and the event will be reset immediately.

Similar to SetEvent.

void OSSignalEventAll ( OSEvent event)

Signals all threads waiting on an event.

If no threads are waiting the event value is set.

If the event mode is OS_EVENT_MODE_MANUAL this will wake all waiting threads and the event will remain set until OSResetEvent is called.

If the event mode is OS_EVENT_MODE_AUTO this will wake all waiting threads and the event will be reset.

void OSWaitEvent ( OSEvent event)

Wait until an event is signalled.

If the event is already set, this returns immediately.

If the event mode is OS_EVENT_MODE_AUTO the event will be reset before returning from this method.

Similar to WaitForSingleObject.

BOOL OSWaitEventWithTimeout ( OSEvent event,
OSTime  timeout 
)

Wait until an event is signalled or a timeout has occurred.

Similar to WaitForSingleObject.