30 #define OS_ALARM_QUEUE_TAG 0x614C6D51u
61 #define OS_ALARM_TAG 0x614C724Du
107 WUT_CHECK_OFFSET(
OSAlarm, 0x00, tag);
108 WUT_CHECK_OFFSET(
OSAlarm, 0x04, name);
109 WUT_CHECK_OFFSET(
OSAlarm, 0x0c, callback);
110 WUT_CHECK_OFFSET(
OSAlarm, 0x10, group);
111 WUT_CHECK_OFFSET(
OSAlarm, 0x18, nextFire);
112 WUT_CHECK_OFFSET(
OSAlarm, 0x20, link);
113 WUT_CHECK_OFFSET(
OSAlarm, 0x28, period);
114 WUT_CHECK_OFFSET(
OSAlarm, 0x30, start);
115 WUT_CHECK_OFFSET(
OSAlarm, 0x38, userData);
116 WUT_CHECK_OFFSET(
OSAlarm, 0x3c, state);
117 WUT_CHECK_OFFSET(
OSAlarm, 0x40, threadQueue);
118 WUT_CHECK_OFFSET(
OSAlarm, 0x50, alarmQueue);
119 WUT_CHECK_OFFSET(
OSAlarm, 0x54, context);
uint32_t group
Used with OSCancelAlarms for bulk cancellation of alarms.
OSTime nextFire
The time when the alarm will next be triggered.
uint32_t state
The current state of the alarm, internal values.
uint32_t tag
Should always be set to the value OS_ALARM_QUEUE_TAG.
OSTime start
The time the alarm was started.
void * userData
User data set with OSSetAlarmUserData and retrieved with OSGetAlarmUserData.
OSAlarmLink link
Link used for when this OSAlarm object is inside an OSAlarmQueue.
OSThreadQueue threadQueue
OSTime period
The period between alarm triggers, this is only set for periodic alarms.
OSContext * context
The context the alarm was triggered on.
OSAlarmCallback callback
The callback to execute once the alarm is triggered.
const char * name
Name set by OSInitAlarmQueueEx.
OSAlarmQueue * alarmQueue
The queue that this alarm is currently in.
BOOL OSSetPeriodicAlarm(OSAlarm *alarm, OSTime start, OSTime interval, OSAlarmCallback callback)
Set a repeated alarm to execute a callback every interval from start.
void OSInitAlarmQueueEx(OSAlarmQueue *queue, const char *name)
Initialise an alarm queue structure with a name.
void OSCreateAlarmEx(OSAlarm *alarm, const char *name)
Initialise an alarm structure with a name.
void OSSetAlarmTag(OSAlarm *alarm, uint32_t group)
Set an alarm tag which is used in OSCancelAlarms for bulk cancellation.
BOOL OSSetAlarm(OSAlarm *alarm, OSTime time, OSAlarmCallback callback)
Set a one shot alarm to perform a callback after a set amount of time.
void OSCancelAlarms(uint32_t group)
Cancel all alarms which have a matching tag set by OSSetAlarmTag.
void OSCreateAlarm(OSAlarm *alarm)
Initialise an alarm structure.
void * OSGetAlarmUserData(OSAlarm *alarm)
Return user data set by OSSetAlarmUserData.
void OSSetAlarmUserData(OSAlarm *alarm, void *data)
Set alarm user data which is returned by OSGetAlarmUserData.
void OSInitAlarmQueue(OSAlarmQueue *queue)
Initialise an alarm queue structure.
BOOL OSWaitAlarm(OSAlarm *alarm)
Sleep the current thread until the alarm has been triggered or cancelled.
void(* OSAlarmCallback)(OSAlarm *, OSContext *)
BOOL OSCancelAlarm(OSAlarm *alarm)
Cancel an alarm.