kernel: panic

This commit is contained in:
Matheus
2023-04-08 21:40:31 -03:00
parent e364f631e4
commit ad70e8741d
4 changed files with 34 additions and 3 deletions
+15
View File
@@ -0,0 +1,15 @@
#include <panic.h>
#include <arch/cpu.h>
#include <printf.h>
__attribute__((noreturn)) void _panic(char *msg, context_t *ctx) {
printf("Oops.\n");
if (msg)
printf("%s\n", msg);
if (ctx)
PRINT_CTX(ctx);
for (;;);
}