Open System Services System Calls Reference Manual (G06.29+, H06.08+, J06.03+)
pthread_sigmask(2) OSS System Calls Reference Manual
NAME
pthread_sigmask - Examines or changes the calling thread’s signal mask
LIBRARY
G-series native OSS processes: /G/system/sysnn/zsptsrl
32-bit H-series and J-series OSS processes that use the POSIX User Thread Model library:
/G/system/zdllnnn/zputdll
64-bit H-series and J-series OSS processes that use the POSIX User Thread Model library:
/G/system/zdllnnn/yputdll
H-series and J-series OSS processes that use the Standard POSIX Threads library:
/G/system/zdllnnn/zsptdll
SYNOPSIS
#include <pthread.h> | #include <spthread.h>
/* pthread.h is required to use POSIX User Thread Model library */
/* spthread.h is required to use Standard POSIX Threads library */
[#include <signal.h>]
int pthread_sigmask(
int how,
const sigset_t *set,
sigset_t *oset);
PARAMETERS
how Indicates how the set of masked signals is to be changed. Valid values are:
SIG_BLOCK The resulting set is the union of the previous set and the signal
set indicated by the set parameter.
SIG_SETMASK
The resulting set is the signal set indicated by the set parameter.
SIG_UNBLOCK
The resulting set is the intersection of the previous signal set and
the complement of the signal set indicated by the set parameter.
set Specifies a signal set by pointing to a set of signals used to change the blocked
set. If this value is NULL, the how parameter is ignored and the signal mask is
unchanged.
oset Receives the value of the current signal mask (unless this value is NULL).
DESCRIPTION
This function examines or changes the calling thread’s signal mask. Typically, you use the
SIG_BLOCK value for the how parameter to block signals during a critical section of code, and
then use the SIG_SETMASK value for the how parameter to restore the signal mask to the value
returned by the previous call to pthread_sigmask().
If any unblocked signals are pending after a call to this function, at least one of those signals is
delivered before this function returns.
This function does not allow the SIGKILL or SIGSTOP signals to be blocked. If a program
attempts to block one of these signals, pthread_sigmask() gives no indication of the error.
On systems running H06.21 or later H-series RVUs or J06.10 or later J-series RVUs, you can use
either the POSIX User Thread Model library or the Standard POSIX Threads library for threaded
applications.
5−178 Hewlett-Packard Company 527186-023