From 809f9a9899b219e33ec839b3f9bee644fcfecacc Mon Sep 17 00:00:00 2001 From: dzwdz Date: Sat, 6 Aug 2022 23:53:42 +0200 Subject: shared assert.h --- src/user/lib/assert.c | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 src/user/lib/assert.c (limited to 'src/user/lib/assert.c') 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 +#include +#include + +_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); +} -- cgit v1.2.3