From 5ee3595bf405c2c39fc36e15b8c2a3a8d131cf9c Mon Sep 17 00:00:00 2001 From: Danny Holman Date: Fri, 16 Feb 2024 13:20:23 -0600 Subject: kernel: panic: add a variable that locks other CPUs Add a static variable to the panic function that should lock all other CPUs. Signed-off-by: Danny Holman --- kernel/panic.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/kernel/panic.c b/kernel/panic.c index c75fafb..be7cffb 100644 --- a/kernel/panic.c +++ b/kernel/panic.c @@ -1,8 +1,11 @@ #include #include +static int panicked = 0; + void panic(const char *str) { kprintf("KERNEL PANIC\n"); kprintf("ERROR: %s\n", str); + panicked = 1; while (1); } -- cgit v1.2.3