change everything to use a common types file

This commit is contained in:
Elijah Thomas
2023-12-24 09:59:13 -05:00
parent d8362c1004
commit e32db6f07a
213 changed files with 3516 additions and 3277 deletions
+7 -8
View File
@@ -1,6 +1,6 @@
#ifndef RVL_SDK_OS_ERROR_H
#define RVL_SDK_OS_ERROR_H
#include "rvl/types.h"
#include <common.h>
#ifdef __cplusplus
extern "C" {
#endif
@@ -9,8 +9,8 @@ extern "C" {
typedef struct OSContext;
#define OSError(...) OSPanic(__FILE__, __LINE__, __VA_ARGS__)
#define OSAssert(exp, ...) \
if (!(exp)) \
#define OSAssert(exp, ...) \
if (!(exp)) \
OSPanic(__FILE__, __LINE__, __VA_ARGS__)
typedef enum {
@@ -35,17 +35,16 @@ typedef enum {
OS_ERR_MAX
} OSErrorType;
typedef void (*OSErrorHandler)(u8 error, OSContext* ctx, u32 dsisr, u32 dar,
...);
typedef void (*OSErrorHandler)(u8 error, OSContext *ctx, u32 dsisr, u32 dar, ...);
extern OSErrorHandler __OSErrorTable[OS_ERR_MAX];
extern u32 __OSFpscrEnableBits;
DECL_WEAK void OSReport(const char* msg, ...);
DECL_WEAK void OSPanic(const char* file, int line, const char* msg, ...);
DECL_WEAK void OSReport(const char *msg, ...);
DECL_WEAK void OSPanic(const char *file, int line, const char *msg, ...);
OSErrorHandler OSSetErrorHandler(u16 error, OSErrorHandler handler);
void __OSUnhandledException(u8 error, OSContext* ctx, u32 dsisr, u32 dar);
void __OSUnhandledException(u8 error, OSContext *ctx, u32 dsisr, u32 dar);
#ifdef __cplusplus
}