diff options
Diffstat (limited to 'libk/stdlib.h')
-rw-r--r-- | libk/stdlib.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libk/stdlib.h b/libk/stdlib.h index 843cc14..0fd1ad8 100644 --- a/libk/stdlib.h +++ b/libk/stdlib.h @@ -62,3 +62,9 @@ void printk(const T& a, const Args&... x) { } extern "C" __attribute__((__noreturn__)) void abort(); + +#define runtime_assert(x, msg) \ + if (!x) { \ + printk(__FILE__, ':', __LINE__, ' ', msg); \ + abort(); \ + } |