From 32407e728971006ed3d0885e01c22fb66c8adc57 Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Fri, 15 Jul 2016 23:12:14 +0200 Subject: Move stuff around, again --- src/lib/libc/debug.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 src/lib/libc/debug.c (limited to 'src/lib/libc/debug.c') diff --git a/src/lib/libc/debug.c b/src/lib/libc/debug.c new file mode 100644 index 0000000..dc04fd3 --- /dev/null +++ b/src/lib/libc/debug.c @@ -0,0 +1,18 @@ +#include + +#include +#include + +void sys_panic(const char* msg, const char* file, int line) { + dbg_printf("PANIC in user process\n %s\n at %s:%d\n", msg, file, line); + exit(-1); + while(true); +} + +void sys_panic_assert(const char* assert, const char* file, int line) { + dbg_printf("ASSERT FAILED in user process\n %s\n at %s:%d\n", assert, file, line); + exit(-1); + while(true); +} + +/* vim: set ts=4 sw=4 tw=0 noet :*/ -- cgit v1.2.3