summaryrefslogtreecommitdiff
path: root/lib/libc/stdlib/abort.c
diff options
context:
space:
mode:
authorKacper <kacper@mail.openlinux.dev>2025-12-09 23:14:53 +0100
committerKacper <kacper@mail.openlinux.dev>2025-12-09 23:14:53 +0100
commit169daa11155988a210fac949297381743f3cb400 (patch)
tree602ef5df5ae9ea075ab3d5dac3c8ad60da1ea2cc /lib/libc/stdlib/abort.c
parent4e2112e165fdd94dee58378e3ea32892f3710cd7 (diff)
feat: clang-tidy fixes
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);