Open System Services System Calls Reference Manual (G06.25+, H06.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
H-series OSS processes: /G/system/zdllnnn/zsptdll
SYNOPSIS
#include <spthread.h>
[#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.
RETURN VALUES
If an error condition occurs, this function returns an integer value indicating the type of error.
Possible return values are:
0 Successful completion.
[EINVAL] The value specified for the how parameter is invalid.
5−98 Hewlett-Packard Company 527186-003