summaryrefslogtreecommitdiff
path: root/include/panic.h
diff options
context:
space:
mode:
authortrimill <trimill@trimillxyz.org>2024-02-01 16:53:07 -0500
committertrimill <trimill@trimillxyz.org>2024-02-01 17:01:52 -0500
commitc8c8d009f6a32e0f6856ab0f8167563021204de9 (patch)
tree9594ab04249ebec6e841c7a78d8bab4ceb1aeacf /include/panic.h
parentfollow the corn style guide (diff)
downloadcorn-c8c8d009f6a32e0f6856ab0f8167563021204de9.tar.gz
corn-c8c8d009f6a32e0f6856ab0f8167563021204de9.tar.bz2
corn-c8c8d009f6a32e0f6856ab0f8167563021204de9.zip
debugger
Diffstat (limited to '')
-rw-r--r--include/panic.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/panic.h b/include/panic.h
index 4f8592e..dc96da1 100644
--- a/include/panic.h
+++ b/include/panic.h
@@ -4,6 +4,7 @@
#define _PANIC_STR2(x) #x
#define panic(msg) _panic_impl(_PANIC_STR(__LINE__), __FILE__, msg)
+#define kassert(val, msg) do { if (!(val)) { panic(msg); } } while(0)
_Noreturn void _panic_impl(char *line, char *file, char *msg);