summaryrefslogtreecommitdiff
path: root/src/user/lib/assert.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/user/lib/assert.c')
-rw-r--r--src/user/lib/assert.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/user/lib/assert.c b/src/user/lib/assert.c
new file mode 100644
index 0000000..f42d696
--- /dev/null
+++ b/src/user/lib/assert.c
@@ -0,0 +1,8 @@
+#include <assert.h>
+#include <camellia/syscalls.h>
+#include <stdio.h>
+
+_Noreturn void __badassert(const char *func, const char *file, int line) {
+ fprintf(stderr, "assertion failure %s:%s:%u\n", file, func, line);
+ _syscall_exit(1);
+}