The pthread_setintr callable service sets the specified interruptability state of the calling thread and atomically returns the previous interruptability state.
Operation | Environment |
---|---|
Authorization: | Supervisor state or problem state, any PSW key |
Dispatchable unit mode: | Task |
Cross memory mode: | PASN = HASN |
AMODE: | 31-bit |
ASC mode: | Primary mode |
Interrupt status: | Enabled for interrupts |
Locks: | Unlocked |
Control parameters: | All parameters must be addressable by the caller and in the primary address space. |
|
AMODE 64 callers use BPX4PSI with the same parameter.
Constant | Description |
---|---|
PTHREAD_INTR_ENABLE# | When interruptability is enabled, new or pending cancelation requests are acted upon according to the interruptability type set by the pthread_setintrtype service (BPX1PST, BPX4PST). |
PTHREAD_INTR_DISABLE# | When interruptability is disabled, cancelation requests against the target thread are held pending. |
The name of a fullword in which the service returns the previous interrupt state, or -1 if the service did not complete successfully.
Return code | Explanation |
---|---|
EINVAL | One of the parameters contains a value that is not valid. |
The name of a fullword in which the pthread_setintr service stores the reason code. The pthread_setintr service returns Reason_code only if Return_value is -1. Reason_code further qualifies the Return_code value. For the reason codes, see z/OS UNIX System Services Messages and Codes.
There are no restrictions on the use of the pthread_setintr service.
For an example using this callable service, see BPX1PSI (pthread_setintr) example.