diff options
Diffstat (limited to '')
-rw-r--r-- | usr/klibc/assert.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/usr/klibc/assert.c b/usr/klibc/assert.c new file mode 100644 index 0000000..cca4129 --- /dev/null +++ b/usr/klibc/assert.c @@ -0,0 +1,14 @@ +/* + * assert.c + */ + +#include <stdlib.h> +#include <stdio.h> +#include <assert.h> +#include <klibc/compiler.h> + +__noreturn __assert_fail(const char *expr, const char *file, unsigned int line) +{ + printf("Assertion %s failed, file %s, line %u\n", expr, file, line); + abort(); +} |