thr_sigsetmask(3scl)thr_sigsetmask(3scl)NAMEthr_sigsetmask - Examine or change the current thread's signal mask.
LIBRARY
SCL Threads Library (libthread.so)
SYNOPSIS
#include <thread.h>
int thr_sigsetmask(
int *how,
const sigset_t *set,
sigset_t *oset );
PARAMETERS
Indicates the manner in which the set of masked signals is changed.
The possible values are as follows:
The resulting set is the union of the current set and the signal set
pointed to by the set argument. The resulting set is the intersection
of the current set and the complement of the signal set pointed to by
the set argument. The resulting set is the signal set pointed to by
the set argument.
Specifies the signal set to be used to change the set of blocked sig‐
nals for this thread. If this set value is NULL, the how argument is
ignored and the process signal mask is unchanged. If this value is not
NULL, oset receives the value of the thread's current signal mask.
DESCRIPTION
This routine examines or changes the calling thread's signal mask.
The thread's current signal mask can be obtained by calling thr_sigset‐
mask(3scl) with NULL for the set parameter.
Typically thr_sigsetmask(3scl) is used to temporarily block signals
during a critical piece of code, say whilst a thread has a mutex
locked. At the end of the critical section, signals can be restored by
calling thr_sigsetmask(3scl) again and specifying SIG_SETMASK with the
thread's original signal mask.
SCL IMPLEMENTATION NOTESthr_sigsetmask(3scl) is implemented by calling pthread_sigmask(3).
RETURN VALUES
If an error condition occurs, this routine returns an integer value
indicating the type of error.
Additional error return information may be written to the SCL error
log. Refer to scl_error_log(4scl) for details.
Possible return values are as follows: Successful completion. The
value of how is invalid and oset is NULL. Or:
An internal implementation error occurred. Refer to the SCL errorlog
for additional information.
ERRORS
None.
RELATED INFORMATION
Functions: pthread_sigmask(3), scl_intro(3scl), scl_thread_intro(3scl)
Files: scl_error_log(4scl)
Manuals: Solaris Compatibility Libraries User's Guide
thr_sigsetmask(3scl)