Kernel panic uses kprint with parameters
This commit is contained in:
@@ -1,9 +1,19 @@
|
||||
#pragma once
|
||||
|
||||
#include <kernel/kprint.h>
|
||||
|
||||
namespace Kernel
|
||||
{
|
||||
|
||||
template<typename... Args>
|
||||
__attribute__((__noreturn__))
|
||||
void panic(const char* message);
|
||||
static void panic(const char* message, Args... args)
|
||||
{
|
||||
kprint("Kernel panic: ");
|
||||
kprint(message, args...);
|
||||
kprint("\n");
|
||||
asm volatile("hlt");
|
||||
__builtin_unreachable();
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user