WUT  0.1
Wii U Toolchain
Data Structures | Macros | Typedefs | Functions
Alarms

Data Structures

struct  OSAlarmQueue
 
struct  OSAlarmLink
 
struct  OSAlarm
 

Macros

#define OS_ALARM_QUEUE_TAG   0x614C6D51u
 
#define OS_ALARM_TAG   0x614C724Du
 

Typedefs

typedef struct OSAlarm OSAlarm
 
typedef struct OSAlarmLink OSAlarmLink
 
typedef struct OSAlarmQueue OSAlarmQueue
 
typedef void(* OSAlarmCallback) (OSAlarm *, OSContext *)
 

Functions

BOOL OSCancelAlarm (OSAlarm *alarm)
 
void OSCancelAlarms (uint32_t group)
 
void OSCreateAlarm (OSAlarm *alarm)
 
void OSCreateAlarmEx (OSAlarm *alarm, const char *name)
 
void * OSGetAlarmUserData (OSAlarm *alarm)
 
void OSInitAlarmQueue (OSAlarmQueue *queue)
 
void OSInitAlarmQueueEx (OSAlarmQueue *queue, const char *name)
 
BOOL OSSetAlarm (OSAlarm *alarm, OSTime time, OSAlarmCallback callback)
 
BOOL OSSetPeriodicAlarm (OSAlarm *alarm, OSTime start, OSTime interval, OSAlarmCallback callback)
 
void OSSetAlarmTag (OSAlarm *alarm, uint32_t group)
 
void OSSetAlarmUserData (OSAlarm *alarm, void *data)
 
BOOL OSWaitAlarm (OSAlarm *alarm)
 

Detailed Description

The alarm family of functions are used for creating alarms which call a callback or wake up waiting threads after a period of time.

Alarms can be one shot alarms which trigger once after a period of time, or periodic which trigger at regular intervals until they are cancelled.

Macro Definition Documentation

#define OS_ALARM_QUEUE_TAG   0x614C6D51u

Definition at line 30 of file alarm.h.

#define OS_ALARM_TAG   0x614C724Du

Definition at line 61 of file alarm.h.

Typedef Documentation

typedef struct OSAlarm OSAlarm

Definition at line 24 of file alarm.h.

typedef struct OSAlarmLink OSAlarmLink

Definition at line 25 of file alarm.h.

typedef struct OSAlarmQueue OSAlarmQueue

Definition at line 26 of file alarm.h.

typedef void(* OSAlarmCallback) (OSAlarm *, OSContext *)

Definition at line 28 of file alarm.h.

Function Documentation

BOOL OSCancelAlarm ( OSAlarm alarm)

Cancel an alarm.

void OSCancelAlarms ( uint32_t  group)

Cancel all alarms which have a matching tag set by OSSetAlarmTag.

Parameters
groupThe alarm tag to cancel.
void OSCreateAlarm ( OSAlarm alarm)

Initialise an alarm structure.

void OSCreateAlarmEx ( OSAlarm alarm,
const char *  name 
)

Initialise an alarm structure with a name.

void* OSGetAlarmUserData ( OSAlarm alarm)

Return user data set by OSSetAlarmUserData.

void OSInitAlarmQueue ( OSAlarmQueue queue)

Initialise an alarm queue structure.

void OSInitAlarmQueueEx ( OSAlarmQueue queue,
const char *  name 
)

Initialise an alarm queue structure with a name.

BOOL OSSetAlarm ( OSAlarm alarm,
OSTime  time,
OSAlarmCallback  callback 
)

Set a one shot alarm to perform a callback after a set amount of time.

Parameters
alarmThe alarm to set.
timeThe duration until the alarm should be triggered.
callbackThe alarm callback to call when the alarm is triggered.
BOOL OSSetPeriodicAlarm ( OSAlarm alarm,
OSTime  start,
OSTime  interval,
OSAlarmCallback  callback 
)

Set a repeated alarm to execute a callback every interval from start.

Parameters
alarmThe alarm to set.
startThe duration until the alarm should first be triggered.
intervalThe interval between triggers after the first trigger.
callbackThe alarm callback to call when the alarm is triggered.
void OSSetAlarmTag ( OSAlarm alarm,
uint32_t  group 
)

Set an alarm tag which is used in OSCancelAlarms for bulk cancellation.

void OSSetAlarmUserData ( OSAlarm alarm,
void *  data 
)

Set alarm user data which is returned by OSGetAlarmUserData.

BOOL OSWaitAlarm ( OSAlarm alarm)

Sleep the current thread until the alarm has been triggered or cancelled.