pthread_testintr (BPX1PTI, BPX4PTI) — Cause a cancellation point to occur

Function

The pthread_testintr callable service causes a cancellation point to occur. If a cancellation request is pending, the cancellation request is acted upon before pthread_testintr returns.

Requirements

Operation Environment
Authorization: Supervisor state or problem state, any PSW key
Dispatchable unit mode: Task
Cross memory mode: PASN = HASN
AMODE (BPX1PTI): 31-bit
AMODE (BPX4PTI): 64-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.

Format

The syntax format is as follows:

AMODE 64 callers use BPX4PTI with the same parameters.

Parameters

Return_value
Returned parameter
Type:
Integer
Length:
Fullword

The name of a fullword in which pthread_testintr returns a 0 if the thread did not have any pending cancellation requests, or -1 if pthread_testintr did not complete (the cancellation request was not tested).

Return_code
Returned parameter
Type:
Integer
Length:
Fullword

The name of a fullword in which the pthread_testintr service stores the return code. The pthread_testintr service returns Return_code only if Return_value is -1. For a complete list of possible return code values, see z/OS UNIX System Services Messages and Codes.

Reason_code
Returned parameter
Type:
Integer
Length:
Fullword

The name of a fullword in which the pthread_testintr service stores the reason code. The pthread_testintr 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.

Usage notes

  1. If a cancellation request is pending when this service is requested, control is not returned.
  2. Calling the pthread_testintr service does not affect the interrupt state or type.
  3. For more information about this service, see the usage notes for pthread_setintr (BPX1PSI, BPX4PSI) — Examine and change the interrupt state.

Characteristics and restrictions

There are no restrictions on the use of the pthread_testintr service.

Examples

For an example using this callable service, see BPX1PTI (pthread_testintr) example.