X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=src%2Fsignal%2Fraise.c;h=f0512019a1921eea797ac84252fd4fd01e3d6d7a;hb=3437e478ba932edbab18a90638c20be1f0141156;hp=b24dc7417f46131ed8e8d687db75ac9487e85768;hpb=d53c92c972dab717f8f8e521eb0e9c4404cef4bd;p=musl diff --git a/src/signal/raise.c b/src/signal/raise.c index b24dc741..f0512019 100644 --- a/src/signal/raise.c +++ b/src/signal/raise.c @@ -1,17 +1,13 @@ #include -#include #include #include "syscall.h" #include "pthread_impl.h" int raise(int sig) { - int pid, tid, ret; sigset_t set; - __syscall(SYS_rt_sigprocmask, SIG_BLOCK, SIGALL_SET, &set, _NSIG/8); - tid = __syscall(SYS_gettid); - pid = __syscall(SYS_getpid); - ret = syscall(SYS_tgkill, pid, tid, sig); - __syscall(SYS_rt_sigprocmask, SIG_SETMASK, &set, 0, _NSIG/8); + __block_app_sigs(&set); + int ret = syscall(SYS_tkill, __pthread_self()->tid, sig); + __restore_sigs(&set); return ret; }