fix mismatched signatures for strtod_l family
[musl] / src / signal / raise.c
index cc2b19b..f051201 100644 (file)
@@ -1,18 +1,13 @@
 #include <signal.h>
-#include <errno.h>
+#include <stdint.h>
 #include "syscall.h"
-
-int __sigprocmask(int, const sigset_t *, sigset_t *);
+#include "pthread_impl.h"
 
 int raise(int sig)
 {
-       int pid, tid, ret;
        sigset_t set;
-       sigfillset(&set);
-       __sigprocmask(SIG_BLOCK, &set, &set);
-       tid = syscall0(__NR_gettid);
-       pid = syscall0(__NR_getpid);
-       ret = syscall3(__NR_tgkill, pid, tid, sig);
-       __sigprocmask(SIG_SETMASK, &set, 0);
+       __block_app_sigs(&set);
+       int ret = syscall(SYS_tkill, __pthread_self()->tid, sig);
+       __restore_sigs(&set);
        return ret;
 }