2022-10-09 05:13:17 +00:00
|
|
|
#ifndef _DOLPHIN_OSRESET
|
|
|
|
#define _DOLPHIN_OSRESET
|
2022-09-10 20:32:26 +00:00
|
|
|
|
|
|
|
#include <types.h>
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2022-11-03 16:17:03 +00:00
|
|
|
#define OS_RESETCODE_RESTART 0x80000000
|
|
|
|
#define OS_RESETCODE_SYSTEM 0x40000000
|
2022-10-11 07:01:27 +00:00
|
|
|
|
2022-11-03 16:17:03 +00:00
|
|
|
#define OS_RESETCODE_EXEC 0xC0000000
|
|
|
|
#define OS_RESETCODE_NETCONFIG 0xC0010000
|
2022-10-11 07:01:27 +00:00
|
|
|
|
2022-11-03 16:17:03 +00:00
|
|
|
#define OS_RESET_TIMEOUT OSMillisecondsToTicks(1000)
|
|
|
|
|
|
|
|
#define OS_RESET_RESTART 0
|
|
|
|
#define OS_RESET_HOTRESET 1
|
|
|
|
#define OS_RESET_SHUTDOWN 2
|
|
|
|
|
|
|
|
#define OS_RESET_PRIO_SO 110
|
|
|
|
#define OS_RESET_PRIO_IP 111
|
|
|
|
#define OS_RESET_PRIO_CARD 127
|
|
|
|
#define OS_RESET_PRIO_PAD 127
|
|
|
|
#define OS_RESET_PRIO_GX 127
|
|
|
|
#define OS_RESET_PRIO_ALARM 4294967295
|
2022-10-11 07:01:27 +00:00
|
|
|
|
2022-09-18 06:05:46 +00:00
|
|
|
typedef BOOL (*OSResetFunction)(BOOL final);
|
2022-09-10 20:32:26 +00:00
|
|
|
typedef struct OSResetFunctionInfo OSResetFunctionInfo;
|
|
|
|
|
2022-09-18 06:05:46 +00:00
|
|
|
struct OSResetFunctionInfo {
|
|
|
|
// public
|
|
|
|
OSResetFunction func;
|
|
|
|
u32 priority;
|
2022-09-10 20:32:26 +00:00
|
|
|
|
2022-09-18 06:05:46 +00:00
|
|
|
// private
|
|
|
|
OSResetFunctionInfo* next;
|
|
|
|
OSResetFunctionInfo* prev;
|
2022-09-10 20:32:26 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2022-10-09 05:13:17 +00:00
|
|
|
#endif // _DOLPHIN_OSRESET
|