2022-11-12 21:04:47 +02:00
|
|
|
#include <stdlib.h>
|
|
|
|
#include <stdio.h>
|
|
|
|
|
2022-11-14 18:53:00 +02:00
|
|
|
#if defined(__is_libk)
|
2023-01-09 14:56:20 +02:00
|
|
|
#include <kernel/Panic.h>
|
2022-11-14 18:53:00 +02:00
|
|
|
#endif
|
|
|
|
|
2022-11-12 21:04:47 +02:00
|
|
|
__attribute__((__noreturn__))
|
|
|
|
void abort(void)
|
|
|
|
{
|
|
|
|
#if defined(__is_libk)
|
2023-02-01 21:05:44 +02:00
|
|
|
Kernel::panic("abort()");
|
2022-11-12 21:04:47 +02:00
|
|
|
#else
|
|
|
|
printf("abort()\n");
|
|
|
|
#endif
|
|
|
|
while (1);
|
|
|
|
__builtin_unreachable();
|
|
|
|
}
|