Information in the THLI area can be used to optimize pthread_setintrtype (BPX1PST, BPX4PST) callable service invocations.
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).