axle OS
x86_32 UNIX-like hobby OS
panic.h
1 #ifndef STD_PANIC_H
2 #define STD_PANIC_H
3 
4 #include "std_base.h"
5 #include <stdint.h>
6 
7 __BEGIN_DECLS
8 
9 #define PANIC(msg, ...) panic_msg(__LINE__, __FILE__, msg, ##__VA_ARGS__);
10 #define ASSERT(cond, msg, ...) if (!(cond)) PANIC(msg, ##__VA_ARGS__)
11 
12 STDAPI void panic_msg(uint16_t line, const char* file, const char* msg, ...) __attribute__((__noreturn__));
13 
14 __END_DECLS
15 
16 #endif // STD_PANIC_H
Definition: elf.h:10
Definition: shapes.h:6