pthread_sigmask

Manipulates the signal mask of the calling thread.

Library:LibC
Classification:POSIX
Service:Threads

Syntax

  #include <pthread.h>
  #include <signal.h>
   
  int   pthread_sigmask (
     int               how,
     const sigset_t   *set,
     sigset_t         *oset);
  

Parameters

how

(IN) Specifies how the signal mask should change using one of the following flags:

Flag

Value

Description

SIG_BLOCK

0x00000000

Adds the signal pointed to by the set parameter to the current mask set.

SIG_UNBLOCK

0x00000001

Removes the signal pointed to by the set parameter from the current mask set.

SIG_SETMASK

0xFFFFFFFF

Replaces the current mask set with the signal pointed to by the set parameter.

set

(IN) Points to an application-defined signal.

oset

(OUT) Points to the current signal mask for the calling thread. If both the how and set parameters are 0, the signal mask is unchanged and the oset parameter returns the current value of the signal mask.

Return Values

If successful, returns 0. Otherwise, returns a nonzero error code.

Decimal

Constant

Description

9

EINVAL

The how parameter is invalid.

79

ENOTSUP

The POSIX semantics linker flag (0x00400000) has not been set. For LibC to support this operation, this linker flag must be set. For more information, see FLAG ON and FLAG OFF Parameters in Volume 1.

Remarks

LibC does not interpret the specific interrupt being posted, so you are free to associate application-specific semantics to the set of interrupts you plan to use. Also, LibC does not queue interrupts. Posting multiple instances of a given interrupt results in only one instance of the interrupt being posted.

IMPORTANT:The pthread_sigmask function is only supported when you compile your NLM to use POSIX semantics, which is supported on NetWare 6.5 SP3 or later.