SquidgeOS/src/kernel/interrupts.h

17 lines
693 B
C
Raw Normal View History

2026-02-08 22:41:38 +00:00
#ifndef PANIC_H
#define PANIC_H
void kpanic(const char *reason);
void kpanic_force();
2026-02-09 18:55:51 +00:00
#define KASSERT(cond, msg) \
if (!(cond)) \
{ \
kprint("ASSERTION FAILED: "); \
kprint(__FILE__); \
kprint(":"); \
2026-02-08 22:41:38 +00:00
/* Note: Printing line numbers requires a custom itoa/printf */ \
2026-02-09 18:55:51 +00:00
kpanic(msg); \
2026-02-08 22:41:38 +00:00
}
#endif