diff options
author | mrb0nk500 <b0nk@b0nk.xyz> | 2023-02-01 18:45:02 -0400 |
---|---|---|
committer | mrb0nk500 <b0nk@b0nk.xyz> | 2023-02-01 18:50:25 -0400 |
commit | 9fa0a7f1da1b70bee995f53c6c96c43189018772 (patch) | |
tree | 114548896790eaff23cdca84a025281de86bbb51 /include/dolphin/os/OSError.h | |
parent | 2ba3289286bbfcf9fcc13fd135d976058d8b6c2e (diff) |
global: Import Dolphin SDK
This version comes from the Metroid Prime decompilation project.
https://github.com/PrimeDecomp/prime
Diffstat (limited to 'include/dolphin/os/OSError.h')
-rw-r--r-- | include/dolphin/os/OSError.h | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/include/dolphin/os/OSError.h b/include/dolphin/os/OSError.h new file mode 100644 index 0000000..8764fbe --- /dev/null +++ b/include/dolphin/os/OSError.h @@ -0,0 +1,39 @@ +#ifndef _DOLPHIN_OSERROR +#define _DOLPHIN_OSERROR + +#include <types.h> + +#ifdef __cplusplus +extern "C" { +#endif + +#define OS_ERROR_SYSTEM_RESET 0 +#define OS_ERROR_MACHINE_CHECK 1 +#define OS_ERROR_DSI 2 +#define OS_ERROR_ISI 3 +#define OS_ERROR_EXTERNAL_INTERRUPT 4 +#define OS_ERROR_ALIGNMENT 5 +#define OS_ERROR_PROGRAM 6 +#define OS_ERROR_FLOATING_POINT 7 +#define OS_ERROR_DECREMENTER 8 +#define OS_ERROR_SYSTEM_CALL 9 +#define OS_ERROR_TRACE 10 +#define OS_ERROR_PERFORMACE_MONITOR 11 +#define OS_ERROR_BREAKPOINT 12 +#define OS_ERROR_SYSTEM_INTERRUPT 13 +#define OS_ERROR_THERMAL_INTERRUPT 14 +#define OS_ERROR_PROTECTION 15 +#define OS_ERROR_FPE 16 + +#define OS_ERROR_MAX (OS_ERROR_FPE + 1) + +typedef u16 OSError; +typedef void (*OSErrorHandler)( OSError error, OSContext* context, ... ); + +OSErrorHandler OSSetErrorHandler(OSError code, OSErrorHandler handler); + +#ifdef __cplusplus +} +#endif + +#endif // _DOLPHIN_OSERROR |