NSMBW-Decomp
A decompilation of New Super Mario Bros. Wii
Loading...
Searching...
No Matches
OSAlarm.h
1#ifndef RVL_SDK_OS_ALARM_H
2#define RVL_SDK_OS_ALARM_H
3#include <types.h>
4#ifdef __cplusplus
5extern "C" {
6#endif
7
8// Forward declarations
9typedef struct OSAlarm OSAlarm;
10typedef struct OSContext OSContext;
11
12typedef void (*OSAlarmHandler)(OSAlarm* alarm, OSContext* ctx);
13
14typedef struct OSAlarm {
15 OSAlarmHandler handler; // at 0x0
16 u32 tag; // at 0x4
17 s64 end; // at 0x8
18 OSAlarm* prev; // at 0x10
19 OSAlarm* next; // at 0x14
20 s64 period; // at 0x18
21 s64 start; // at 0x20
22 void* userData; // at 0x28
23} OSAlarm;
24
25typedef struct OSAlarmQueue {
26 OSAlarm* head; // at 0x0
27 OSAlarm* tail; // at 0x4
29
30void __OSInitAlarm(void);
31void OSCreateAlarm(OSAlarm* alarm);
32void OSSetAlarm(OSAlarm* alarm, s64 tick, OSAlarmHandler handler);
33void OSSetPeriodicAlarm(OSAlarm* alarm, s64 tick, s64 period,
34 OSAlarmHandler handler);
35void OSCancelAlarm(OSAlarm* alarm);
36void OSSetAlarmTag(OSAlarm* alarm, u32 tag);
37void OSSetAlarmUserData(OSAlarm* alarm, void* userData);
38void* OSGetAlarmUserData(const OSAlarm* alarm);
39
40#ifdef __cplusplus
41}
42#endif
43#endif