diff options
Diffstat (limited to 'kernel/panic.c')
| -rw-r--r-- | kernel/panic.c | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/kernel/panic.c b/kernel/panic.c deleted file mode 100644 index b0d9daf..0000000 --- a/kernel/panic.c +++ /dev/null @@ -1,25 +0,0 @@ -#include "panic.h" -#include "kprint.h" - -#include <stdbool.h> - -static char const *reason_strings[] = { - "general panic", - "unhandled fault", - "out of memory" -}; - -noreturn void panic(enum panic_reason reason) -{ - // TODO: kprintf() and friends - kputs("kernel panic: "); - kputs(reason_strings[reason]); - kputs("\n"); - halt(); -} - -noreturn void halt(void) -{ - __asm__ ("cli\n\t"); - while (true) __asm__ ("hlt\n\t"); -} |
