diff options
| author | Ian McFarlane <i.mcfarlane2002@gmail.com> | 2025-05-06 15:14:11 -0400 |
|---|---|---|
| committer | Ian McFarlane <i.mcfarlane2002@gmail.com> | 2025-05-06 15:14:11 -0400 |
| commit | da396afa8b612b8f8ff07d71c57761a627b158eb (patch) | |
| tree | b4935b29aca686c6ee17a583cffe149d7bb3c819 /kernel/lib/panic.c | |
| parent | update forkman with spinlock (diff) | |
| parent | start docs (diff) | |
| download | comus-forkman.tar.gz comus-forkman.tar.bz2 comus-forkman.zip | |
merge main into forkmanforkman
Diffstat (limited to 'kernel/lib/panic.c')
| -rw-r--r-- | kernel/lib/panic.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/kernel/lib/panic.c b/kernel/lib/panic.c index 3a6e029..99936c1 100644 --- a/kernel/lib/panic.c +++ b/kernel/lib/panic.c @@ -1,6 +1,8 @@ #include <lib.h> #include <stdarg.h> #include <comus/asm.h> +#include <comus/drivers/ps2.h> +#include <comus/drivers/spkr.h> __attribute__((noreturn)) void __panic(unsigned int line, const char *file, const char *format, ...) @@ -16,6 +18,15 @@ __attribute__((noreturn)) void __panic(unsigned int line, const char *file, log_backtrace(); #endif - while (1) - halt(); + fatal_loop(); +} + +__attribute__((noreturn)) void fatal_loop(void) +{ + while (1) { + spkr_play_tone(1000); + kspin_milliseconds(200); + spkr_quiet(); + kspin_milliseconds(800); + } } |