Optimization processing for BPX1SPM, BPX4SPM (sigprocmask)

Information in the THLI data area can be used to optimize sigprocmask (BPX1SPM, BPX4SPM) invocations.

The optimizing program should first process the new mask that is provided by the caller of BPX1SPM (BPX4SPM), to determine if optimization is possible. If no new mask is provided, no change is being made to the signal mask, and this call can be optimized.

To process the new mask, the optimizing program should first generate the effective new mask using the new mask provided by the caller, clearing bits from this new mask for any signals that cannot be caught (ANDing the provided mask with PrliCatcherMask), and then applying the How requested by the caller as follows:
Table 1. Optimization processing for BPX1SPM, BPX4SPM (sigprocmask)
How Effective mask
SIG_SETMASK New mask ANDed with PrliCatcherMask
SIG_BLOCK New mask ORed with ThliSigMask
SIG_UNBLOCK Complement new mask ANDed with ThliSigMask
Other An incorrect How was specified; issue BPX1SPM (BPX4SPM) or fail the request with an appropriate error code.

If the effective mask does not equal the current mask in ThliSigMask, a change in value of the current signal mask must be made, and BPX1SPM (BPX4SPM) should be issued. If the effective mask is the same as the current signal mask, the request is a NOOP and may be optimized.

If the request is being optimized and the caller requested that the previous value of the signal mask be returned, the optimizing program should return ThliSigMask to the caller.