diff options
author | Marvin Borner | 2020-05-28 19:41:02 +0200 |
---|---|---|
committer | Marvin Borner | 2020-05-28 19:41:02 +0200 |
commit | f676cc7bb821f498efe73f38bf19b43e4b91f575 (patch) | |
tree | 2e5e08780434c6f965a089f2a1407478c3d98173 /src/userspace/libc/assert/assert.c | |
parent | f784575fdbbee6e096866c0b506fd660dc5ffe1c (diff) |
Added assertion to userspace
Diffstat (limited to 'src/userspace/libc/assert/assert.c')
-rw-r--r-- | src/userspace/libc/assert/assert.c | 8 |
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 |