1 #include <errno.h> 2 #include <signal.h> 3 4 #include "threads_impl.h" 5 pthread_sigmask(int how,const sigset_t * restrict set,sigset_t * restrict old)6int pthread_sigmask(int how, const sigset_t* restrict set, sigset_t* restrict old) { 7 if ((unsigned)how - SIG_BLOCK > 2U) 8 return EINVAL; 9 if (old) { 10 if (sizeof old->__bits[0] == 8) { 11 old->__bits[0] &= ~0x380000000ULL; 12 } else { 13 old->__bits[0] &= ~0x80000000UL; 14 old->__bits[1] &= ~0x3UL; 15 } 16 } 17 return 0; 18 } 19