mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-05-24 15:00:55 -04:00
4346df764b
* add "global.h" to files that use it * add MSL_C includes to files that use them * remove dolphin includes from headers that don't need them * remove JSupport includes from headers that don't need them * remove JKernel includes from headers that don't need them * remove JUtility includes from headers that don't need them * remove J3D includes from headers that don't need them * remove J2D includes from headers that don't need them * remove JAudio2 includes from headers that don't need them * remove Z2AudioLib includes from headers that don't need them * remove JMessage includes from headers that don't need them * remove JParticle includes from headers that don't need them * remove SComponent includes from headers that don't need them * remove dol includes from headers that don't need them * sort includes
47 lines
1.2 KiB
C
47 lines
1.2 KiB
C
#ifndef OSALARM_H
|
|
#define OSALARM_H
|
|
|
|
#include "dolphin/os/OSError.h"
|
|
#include "dolphin/os/OSTime.h"
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
typedef struct OSAlarmLink {
|
|
/* 0x0 */ struct OSAlarm* prev;
|
|
/* 0x4 */ struct OSAlarm* next;
|
|
} OSAlarmLink;
|
|
|
|
typedef struct OSAlarm;
|
|
typedef void (*OSAlarmHandler)(struct OSAlarm* alarm, OSContext* context);
|
|
|
|
typedef struct OSAlarm {
|
|
/* 0x00 */ OSAlarmHandler handler;
|
|
/* 0x04 */ u32 tag;
|
|
/* 0x08 */ OSTime fire_time;
|
|
/* 0x10 */ OSAlarmLink link;
|
|
/* 0x18 */ OSTime period_time;
|
|
/* 0x20 */ OSTime start_time;
|
|
} OSAlarm; // Size: 0x28
|
|
|
|
typedef struct OSAlarmQueue {
|
|
OSAlarm* head;
|
|
OSAlarm* tail;
|
|
} OSAlarmQueue;
|
|
|
|
void OSInitAlarm(void);
|
|
void OSCreateAlarm(OSAlarm* alarm);
|
|
static void InsertAlarm(OSAlarm* alarm, s64 time, OSAlarmHandler handler);
|
|
void OSSetAlarm(OSAlarm* alarm, s64 time, OSAlarmHandler handler);
|
|
void OSSetPeriodicAlarm(OSAlarm* alarm, s64 start, s64 period, OSAlarmHandler handler);
|
|
void OSCancelAlarm(OSAlarm* alarm);
|
|
static void DecrementerExceptionCallback(__OSException exception, OSContext* context);
|
|
static void DecrementerExceptionHandler(__OSException exception, OSContext* context);
|
|
|
|
#ifdef __cplusplus
|
|
};
|
|
#endif
|
|
|
|
#endif /* OSALARM_H */
|