queue_interrupt (BPX1SPB, BPX4SPB) — Return the last interrupt delivered

Function

The queue_interrupt callable service returns to the kernel the last interrupt that was delivered to the signal interface routine (SIR). The interrupt can be a signal, a cancelation request, or a quiesce request.

Requirements

Operation Environment
Authorization: Supervisor state or problem state, any PSW key
Dispatchable unit mode: Task
Cross memory mode: PASN = HASN
AMODE (BPXB1SPB): 31-bit
AMODE (BPX4SPB): 64-bit
ASC mode: Primary address space control (ASC) 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

CALL BPX1SPB,(Return_value,
              Return_code,
              Reason_code)

AMODE 64 callers use BPX4SPB with the same parameters.

Parameters

Return_value
Returned parameter
Type:
Integer
Length:
Fullword

The name of a fullword to which the queue_interrupt service returns 0 if it has permission to return the specified interrupt for delivery at the next kernel call. If no interrupt is returned, -1 is returned.

Return_code
Returned parameter
Type:
Integer
Length:
Fullword
The name of a fullword in which the queue_interrupt service stores the return code. The queue_interrupt 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. The queue_interrupt service can return one of the following values in the Return_code parameter:
Return_code Explanation
EINVAL The value of Signal in the PPSD at the time this service was invoked was an unsupported signal. Either there was a storage overlay in the PPSD, or no signal was ever delivered to this task.
EPERM The caller does not have permission to return the interrupt now. All signals must be blocked, and the task must invoke mvssigsetup before the queue_interrupt service is invoked. The following reason codes can accompany the return code: JRSignalsNotBlocked and JRNotSigsetup.
Reason_code
Returned parameter
Type:
Integer
Length:
Fullword

The name of a fullword in which the queue_interrupt service stores the reason code. The queue_interrupt 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. The data that is mapped by the BPXYPPSD control block is used by the queue_interrupt service, and therefore should not be modified by the invoker, because this may result in an EINVAL return code.
  2. The queue_interrupt returns the interrupt to the kernel and restores the signal blocking mask to its preinterrupt state. The signal is acted on at the end of the next service.
  3. When the PPSDJUMPBACK flag is set on in the BPXYPPSD (see BPXYPPSD — Map signal delivery data) and the queue_interrupt call is valid, control is not returned to the instruction after the queue_interrupt invocation. Instead, it is returned to the point of the signal interruption that was just queued back to the kernel. General and access registers are restored to the values saved in the PPSD at the time of the interrupt.
  4. When the PPSDREDRIVE flag is set on in the BPXYPPSD, the kernel is responsible for rescheduling the queued signal to interrupt the current thread at a later time. The signal interface routine (SIR) is no longer responsible for issuing another syscall to cause delivery of the signal. In fact, nonblocking syscalls (syscalls that do not return EINTR) do not cause delivery of pending deliverable signals when a redrive signal is in progress. Delivery of the signal only occurs when the redrive time limit expires. This time limit is maintained by the kernel and cannot be specified by the user.
  5. When the PPSDMASKONLY flag is set on, the kernel does not requeue the signal; it only resets the signal mask to the value in PPSDCURRENTMASK.

Related services

Characteristics and restrictions

The intended use of the queue_interrupt service is from the signal interface routine that is specified on mvssigsetup (BPX1MSS, BPX4MSS) — Set up MVS signals. Although the queue_interrupt service can be used anywhere, all signals must be blocked, and the task must set up signals by invoking the mvssigsetup service before calling queue_interrupt. See The relationship of z/OS UNIX signals to callable services.

Examples

For an example using this callable service, see BPX1SPB (queue_interrupt) example.