Optimization processing for BPX1PSI, BPX4PSI (pthread_setintr)

Information in the THLI area can be used to optimize pthread_setintr (BPX1PSI, BPX4PSI) callable service invocations. BPX1PSI (BPX4PSI) must not be optimized if a signal is pending for the thread. A signal pending condition is indicated by the ThliSigPending flag. When this flag is on, indicating that a signal is pending, BPX1PSI (BPX4PSI) must be called to process the request and process signal delivery.

Table 1 maps the actions that can be taken for BPX1PSI (BPX4PSI) when there is no signal pending. The result column shows the action that the optimizing program can take. The cancel pending column reflects the setting of ThliCancelPending, and the current state column that of ThliCancelDisabled. The new state is provided by the caller of BPX1PSI (BPX4PSI). The interruptablity type, which is set by BPX1PST (BPX4PST), is not applicable to BPX1PSI (BPX4PSI) processing.
Table 1. Optimization processing for BPX1PSI, BPX4PSI (pthread_setintr)
The current state New state Interupptability type Cancel pending Result
Disabled Disabled Not applicable Not applicable Return "disabled"
Enabled Disabled Not applicable Not applicable Issue BPX1PSI (BPX4PSI)
Enabled Enabled Not applicable Yes Issue BPX1PSI (BPX4PSI)
Enabled Enabled Not applicable No Return "enabled"
Disabled Enabled Not applicable Not applicable Issue BPX1PSI (BPX4PSI)
Not applicable Invalid Not applicable Not applicable Issue BPX1PSI (BPX4PSI)

In other words, the optimizing program should issue the BPX1PSI (BPX4PSI) if there is a request to change the interruptability state, or if the state is enabled and there is a cancel pending, as indicated by the ThliCancelPending bit.