corn/include/panic.h

11 lines
274 B
C
Raw Normal View History

2024-01-29 21:27:03 +00:00
#pragma once
#define _PANIC_STR(x) _PANIC_STR2(x)
#define _PANIC_STR2(x) #x
#define panic(msg) _panic_impl(_PANIC_STR(__LINE__), __FILE__, msg)
_Noreturn void _panic_impl(char *line, char *file, char *msg);
2024-01-30 15:19:33 +00:00
_Noreturn void panic_interrupt(void *ip, void *bp, char *msg);