From 95cd78840f0891e60f5ebecc8a8eb4fbaf3c2ebf Mon Sep 17 00:00:00 2001 From: Danny Holman Date: Sun, 12 Jan 2025 01:17:36 -0600 Subject: PROJECT RESTRUCTURING Move the entire kernel into its own directory. Create new directories for system commands, libraries and other required essentials for a complete Unix-like operating system. Signed-off-by: Danny Holman --- kernel/panic.c | 26 -------------------------- 1 file changed, 26 deletions(-) delete mode 100644 kernel/panic.c (limited to 'kernel/panic.c') diff --git a/kernel/panic.c b/kernel/panic.c deleted file mode 100644 index 65279f0..0000000 --- a/kernel/panic.c +++ /dev/null @@ -1,26 +0,0 @@ -#include -#include -#include -#include - -static int panicked = 0; - -void walk_stack(uintptr_t *addrs, size_t n); - -void stack_trace(void) { - kprintf("PRINTING STACK TRACE\n"); - uintptr_t strace[32]; - walk_stack(strace, 32); - for (int i = 0; i < 32; i++) { - if (strace[i] == 0) - break; - kprintf("#%d: %x\n", i, strace[i]); - } -} - -void panic(const char *str) { - panicked = 1; - kprintf("KERNEL PANIC: %s\n", str); - stack_trace(); - while (1); -} -- cgit v1.2.3