diff options
| author | Ada Christine <adachristine18@gmail.com> | 2022-02-17 13:40:55 +0000 |
|---|---|---|
| committer | Ada Christine <adachristine18@gmail.com> | 2022-02-17 13:40:55 +0000 |
| commit | 9b63c0000b2e0d9d0a306e56dbc7bc28403e5549 (patch) | |
| tree | 17ef5aa53d37c4232f8efcca97c5f118a96fb96f /kc/core/panic.h | |
| parent | b8ef8b401d9dd1e15f2703eb997fb79a70ae531a (diff) | |
many changes have happned
- updates to panic() interface
- genericized timer interface
- (yet unused) additions to task management
Diffstat (limited to 'kc/core/panic.h')
| -rw-r--r-- | kc/core/panic.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/kc/core/panic.h b/kc/core/panic.h index 0cfd7c2..1ace5ba 100644 --- a/kc/core/panic.h +++ b/kc/core/panic.h @@ -2,12 +2,16 @@ #include <stdnoreturn.h> +#define PANIC(reason) panic(__FILE__, __LINE__, reason) + enum panic_reason { GENERAL_PANIC, UNHANDLED_FAULT, OUT_OF_MEMORY, + DEAD_END }; -noreturn void panic(enum panic_reason reason); +noreturn void panic(const char *file, int line, enum panic_reason reason); noreturn void halt(void); + |
