Add kernel panic function

This commit is contained in:
Bananymous
2022-11-14 18:53:00 +02:00
parent b185ed4fd3
commit 9e933a5ec5
4 changed files with 31 additions and 2 deletions

View File

@@ -1,12 +1,15 @@
#include <stdlib.h>
#include <stdio.h>
#if defined(__is_libk)
#include <kernel/panic.h>
#endif
__attribute__((__noreturn__))
void abort(void)
{
#if defined(__is_libk)
printf("Kernel panic: abort()\n");
asm volatile("hlt");
Kernel::panic("abort()");
#else
printf("abort()\n");
#endif