Better panic, with PANIC macro

This commit is contained in:
Imbus 2025-09-02 00:17:44 +02:00
parent a6ae43f583
commit 6c21ac7669
2 changed files with 18 additions and 6 deletions

View file

@ -1,6 +1,8 @@
#ifndef KERNEL_PANIC_H
#define KERNEL_PANIC_H
void panic(char *s);
#define PANIC(fmt, ...) __panic("[%s:%d %s] \n" fmt, __FILE__, __LINE__, __func__)
void __panic(const char *restrict fmt, ...);
#endif