Sync/libc/stdlib/abort.c

15 lines
282 B
C
Raw Normal View History

2019-04-01 01:18:48 +00:00
#include <stdio.h>
#include <stdlib.h>
__attribute__((__noreturn__))
void abort(void) {
#if defined(__is_libk)
//TODO: Kernel panic.
printf(">>PANIC<<<\n abort() panicked!\n");
#else
printf("abort() called\n");
#endif
while(1) {}
__builtin_unreachable();
}