swissChili | 0b35bf2 | 2021-02-18 12:49:40 -0800 | [diff] [blame] | 1 | #pragma once |
| 2 | |
| 3 | #include "kint.h" |
| 4 | |
| 5 | void kprintf(const char *format, ...); |
swissChili | 825d46b | 2021-02-21 10:14:16 -0800 | [diff] [blame] | 6 | void kassert_int(bool condition, const char *message, const char *file, |
| 7 | const int line); |
swissChili | 0b35bf2 | 2021-02-18 12:49:40 -0800 | [diff] [blame] | 8 | |
| 9 | #define kassert(cond, msg) kassert_int((cond), (msg), __FILE__, __LINE__) |
swissChili | 825d46b | 2021-02-21 10:14:16 -0800 | [diff] [blame] | 10 | #define kpanic(msg) \ |
| 11 | kassert(false, msg); \ |
| 12 | __builtin_unreachable() |