SquidgeOS/src/kernel/interrupts.h

19 lines
758 B
C
Raw Normal View History

2026-02-08 22:41:38 +00:00
#ifndef PANIC_H
#define PANIC_H
void interrupt_init();
void kpanic(const char *, ...);
2026-02-08 22:41:38 +00:00
void kpanic_force();
void handle_interrupt(unsigned long code);
2026-02-08 22:41:38 +00:00
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