#include <thread.h> #include <signal.h> int thr_sigsetmask(int how, const sigset_t *set, sigset_t *oset);
thr_sigsetmask() changes or examines a calling thread's signal mask. Each thread has its own signal mask. A new thread inherits the calling thread's signal mask and priority. However, pending signals are not inherited. Pending signals for a new thread will be empty.
If the value of the argument set is not NULL, set points to a set of signals that can modify the currently blocked set. If the value of set is NULL, the value of how is insignificant and the thread's signal mask is unmodified. Use this behavior to inquire about the currently blocked signals.
The value of how specifies the method in which the set is changed. how takes one of the following values.
SIG_BLOCK. set corresponds to a set of signals to block. The signals are added to the current signal mask.
SIG_UNBLOCK. set corresponds to a set of signals to unblock. These signals are deleted from the current signal mask.
SIG_SETMASK. set corresponds to the new signal mask. The current signal mask is replaced by set.