mirror of
https://github.com/encounter/tp.git
synced 2026-07-11 06:18:46 -07:00
copy dolsdk2004 to tp / b_bh + e_mb done (#2299)
* move dolsdk2004 over * cleanup some temp work * finish and cleanup gf * b_bh done * d_a_e_mb done
This commit is contained in:
@@ -1,46 +1,36 @@
|
||||
#ifndef OSALARM_H
|
||||
#define OSALARM_H
|
||||
#ifndef _DOLPHIN_OSALARM_H_
|
||||
#define _DOLPHIN_OSALARM_H_
|
||||
|
||||
#include "dolphin/os/OSError.h"
|
||||
#include "dolphin/os/OSTime.h"
|
||||
#include <dolphin/os.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;
|
||||
typedef struct OSAlarm OSAlarm;
|
||||
typedef void (*OSAlarmHandler)(OSAlarm* alarm, OSContext* context);
|
||||
struct OSAlarm {
|
||||
OSAlarmHandler handler;
|
||||
u32 tag;
|
||||
OSTime fire;
|
||||
OSAlarm* prev;
|
||||
OSAlarm* next;
|
||||
OSTime period;
|
||||
OSTime start;
|
||||
};
|
||||
|
||||
BOOL OSCheckAlarmQueue(void);
|
||||
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);
|
||||
void OSSetAlarm(OSAlarm* alarm, OSTime tick, OSAlarmHandler handler);
|
||||
void OSSetAbsAlarm(OSAlarm* alarm, OSTime time, OSAlarmHandler handler);
|
||||
void OSSetPeriodicAlarm(OSAlarm* alarm, OSTime start, OSTime period, OSAlarmHandler handler);
|
||||
void OSCancelAlarm(OSAlarm *alarm);
|
||||
void OSSetAlarmTag(OSAlarm* alarm, u32 tag);
|
||||
void OSCancelAlarms(u32 tag);
|
||||
|
||||
#ifdef __cplusplus
|
||||
};
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* OSALARM_H */
|
||||
#endif // _DOLPHIN_OSALARM_H_
|
||||
|
||||
Reference in New Issue
Block a user