summaryrefslogtreecommitdiff
path: root/lib/libc/stdlib/abort.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc/stdlib/abort.c')
-rw-r--r--lib/libc/stdlib/abort.c21
1 files changed, 11 insertions, 10 deletions
diff --git a/lib/libc/stdlib/abort.c b/lib/libc/stdlib/abort.c
index 3d022e70..99001570 100644
--- a/lib/libc/stdlib/abort.c
+++ b/lib/libc/stdlib/abort.c
@@ -1,11 +1,11 @@
-#include <atomic.h>
-#include <stdlib.h>
-#include <syscall.h>
-#include <asm-generic/signal.h>
-#include <thread.h>
-#include <threads.h>
-#include <unistd.h>
-#include <libc.h>
+#include <__thread.h> // for __thread_self
+#include <atomic.h> // for LIBC_LOCK
+#include <libc.h> // for (anonymous struct)::(anonymous), (anonymous)
+#include <signal.h> // for SIGABRT, sigaction, SIGKILL, SIG_DFL
+#include <stdlib.h> // for abort
+#include <syscall.h> // for __syscall, __syscall_2, __syscall_4
+#include <threads.h> // for thrd_current
+#include <unistd.h> // for _exit
int raise(int);
@@ -18,8 +18,9 @@ _Noreturn void abort(void)
LIBC_LOCK(libc.lock.abort);
sa.sa_handler = SIG_DFL;
- __syscall(rt_sigaction, SIGABRT, &sa, NULL, _NSIG / 8);
- __syscall(tkill, thrd_current()->tid, SIGABRT);
+ __syscall(rt_sigaction, SIGABRT, &sa, 0, 64 / 8);
+ __syscall(tkill, ((struct __thread_self *)thrd_current())->tid,
+ SIGABRT);
// This point should never be reached
raise(SIGKILL);