4 #include "pthread_impl.h"
7 #include "ksigaction.h"
9 _Noreturn void abort(void)
13 /* If there was a SIGABRT handler installed and it returned, or if
14 * SIGABRT was blocked or ignored, take an AS-safe lock to prevent
15 * sigaction from installing a new SIGABRT handler, uninstall any
16 * handler that may be present, and re-raise the signal to generate
17 * the default action of abnormal termination. */
20 __syscall(SYS_rt_sigaction, SIGABRT,
21 &(struct k_sigaction){.handler = SIG_DFL}, 0, _NSIG/8);
22 __syscall(SYS_tkill, __pthread_self()->tid, SIGABRT);
23 __syscall(SYS_rt_sigprocmask, SIG_UNBLOCK,
24 &(long[_NSIG/(8*sizeof(long))]){1UL<<(SIGABRT-1)}, 0, _NSIG/8);
26 /* Beyond this point should be unreachable. */