change jmp_buf to share an underlying type and struct tag with sigjmp_buf
[musl] / src / signal / siglongjmp.c
index d0e4f67..2974ff7 100644 (file)
@@ -2,10 +2,10 @@
 #include <signal.h>
 #include <stdlib.h>
 #include "syscall.h"
+#include "pthread_impl.h"
 
 _Noreturn void siglongjmp(sigjmp_buf buf, int ret)
 {
-       if (buf->__fl) __syscall(SYS_rt_sigprocmask, SIG_SETMASK,
-               buf->__ss, 0, __SYSCALL_SSLEN);
-       longjmp(buf->__jb, ret);
+       if (buf->__fl) __restore_sigs(buf->__ss);
+       longjmp(buf, ret);
 }