diff options
author | Danny Holman <dholman@gymli.org> | 2024-02-16 13:20:23 -0600 |
---|---|---|
committer | Danny Holman <dholman@gymli.org> | 2024-02-16 13:20:23 -0600 |
commit | 5ee3595bf405c2c39fc36e15b8c2a3a8d131cf9c (patch) | |
tree | 44a3595c3d02292bc42d6c59ba3af435d6189378 /kernel | |
parent | 33fdc9b20c12e6c776ed76fc59d848a3ad7f6bca (diff) |
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 <dholman@gymli.org>
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/panic.c | 3 |
1 files changed, 3 insertions, 0 deletions
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 <kernel/panic.h> #include <kernel/io.h> +static int panicked = 0; + void panic(const char *str) { kprintf("KERNEL PANIC\n"); kprintf("ERROR: %s\n", str); + panicked = 1; while (1); } |