aboutsummaryrefslogtreecommitdiff
path: root/src/userspace/libc/assert/assert.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/userspace/libc/assert/assert.c')
-rw-r--r--src/userspace/libc/assert/assert.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/userspace/libc/assert/assert.c b/src/userspace/libc/assert/assert.c
new file mode 100644
index 0000000..efd9083
--- /dev/null
+++ b/src/userspace/libc/assert/assert.c
@@ -0,0 +1,8 @@
+#include <stdio.h>
+#include <stdlib.h>
+
+void _assert(const char *file, int line, const char *func, const char *exp)
+{
+ printf("%s:%d: %s: Assertion '%s' failed", file, line, func, exp);
+ exit(1);
+} \ No newline at end of file