diff options
author | Freya Murphy <freya@freyacat.org> | 2025-04-03 16:53:51 -0400 |
---|---|---|
committer | Freya Murphy <freya@freyacat.org> | 2025-04-03 16:54:42 -0400 |
commit | 516e920cd96730cf470357aa250636d9d42a849c (patch) | |
tree | 16e177ffc8bfed0a86abe46455bcbb37c2dbed6d /kernel/io/panic.c | |
parent | boot headers moved (diff) | |
download | comus-516e920cd96730cf470357aa250636d9d42a849c.tar.gz comus-516e920cd96730cf470357aa250636d9d42a849c.tar.bz2 comus-516e920cd96730cf470357aa250636d9d42a849c.zip |
memory allocator/pager, plus other stuff
Diffstat (limited to '')
-rw-r--r-- | kernel/io/panic.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/kernel/io/panic.c b/kernel/io/panic.c new file mode 100644 index 0000000..948542e --- /dev/null +++ b/kernel/io/panic.c @@ -0,0 +1,16 @@ +#include <lib.h> +#include <stdarg.h> +#include <comus/asm.h> + +__attribute__((noreturn)) +void panic(const char *format, ...) { + cli(); + va_list list; + va_start(list, format); + printf("\n\n!!! PANIC !!!\n"); + vprintf(format, list); + printf("\n\n"); + + while (1) + halt(); +} |