17 lines
547 B
C
17 lines
547 B
C
#pragma once
|
|
#include "interrupts/Context.h"
|
|
|
|
#ifdef __cplusplus
|
|
extern "C"
|
|
{
|
|
#endif
|
|
[[noreturn]] void __do_int_panic(Context* context, const char* file, int line, const char* message);
|
|
[[noreturn]] void __do_panic(Context* context, const char* message);
|
|
|
|
[[noreturn]] void __panic(const char* message);
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#define panic(message) asm volatile("cli\npush $16\npushq %%rsp\npushfq\npush $8\ncall __panic" : : "D"(message))
|
|
#define int_panic(context, message) __do_int_panic(context, __FILE__, __LINE__, message) |