| OLD | NEW |
| 1 #include <signal.h> | 1 #include <signal.h> |
| 2 #include <errno.h> | 2 #include <errno.h> |
| 3 #include "syscall.h" | 3 #include "syscall.h" |
| 4 | 4 |
| 5 int pthread_sigmask(int how, const sigset_t *restrict set, sigset_t *restrict ol
d) | 5 int pthread_sigmask(int how, |
| 6 { | 6 const sigset_t* restrict set, |
| 7 » int ret; | 7 sigset_t* restrict old) { |
| 8 » if ((unsigned)how - SIG_BLOCK > 2U) return EINVAL; | 8 int ret; |
| 9 » ret = -__syscall(SYS_rt_sigprocmask, how, set, old, _NSIG/8); | 9 if ((unsigned)how - SIG_BLOCK > 2U) |
| 10 » if (!ret && old) { | 10 return EINVAL; |
| 11 » » if (sizeof old->__bits[0] == 8) { | 11 ret = -__syscall(SYS_rt_sigprocmask, how, set, old, _NSIG / 8); |
| 12 » » » old->__bits[0] &= ~0x380000000ULL; | 12 if (!ret && old) { |
| 13 » » } else { | 13 if (sizeof old->__bits[0] == 8) { |
| 14 » » » old->__bits[0] &= ~0x80000000UL; | 14 old->__bits[0] &= ~0x380000000ULL; |
| 15 » » » old->__bits[1] &= ~0x3UL; | 15 } else { |
| 16 » » } | 16 old->__bits[0] &= ~0x80000000UL; |
| 17 » } | 17 old->__bits[1] &= ~0x3UL; |
| 18 » return ret; | 18 } |
| 19 } |
| 20 return ret; |
| 19 } | 21 } |
| OLD | NEW |