Optimization processing for BPX1PST, BPX4PST (pthread_setintrtype)

Information in the THLI area can be used to optimize pthread_setintrtype (BPX1PST, BPX4PST) callable service invocations.

Table 1 maps the actions that can be taken for BPX1PST (BPX4PST) 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, the cancel disabled column the setting of ThliCancelPending, and the current interruptability type column the setting of ThliCancelAsync. The new interruptability type is provided by the caller of BPX1PST (BPX4PST).
Table 1. Optimization processing for BPX1PST, BPX4PST (pthread_setintrtype)
The current int. type New int. type Cancel disabled Cancel pending Result
Controlled Controlled N/A N/A Return "controlled"
Asynch Controlled N/A N/A Issue BPX1PST
Controlled Asynch N/A N/A Issue BPX1PST (BPX4PST)
Asynch Asynch Yes N/A Return "asynch"
Asynch Asynch No No Return "asynch"
Asynch Asynch No Yes Issue BPX1PST (BPX4PST)
N/A Invalid N/A N/A Issue BPX1PST (BPX4PST)

In other words, the optimizing program should issue the BPX1PST (BPX4PST) if there is a request to change the interruptability type; or if the type is asynchronous and cancel is not disabled (ThliCancelDisabled off) and there is a cancel pending (ThliCancelPending on).