Branch entry to the WAIT service routine, which is not available
to Type 1 SVCs or SRBs, provides all the normal ECB and RB WAIT processing. IBM® does not recommend branch entry
into the WAIT service routine because the caller must manually save
the environment to be restored. A better choice might be to use the
LINKAGE=SYSTEM parameter statement with the WAIT macro. See z/OS MVS Programming: Assembler Services Reference IAR-XCT for
details on the SYSTEM=LINKAGE parameter with the WAIT macro.
While holding home's LOCAL lock and before branching to WAIT, the
caller must establish the PSW and register return environment in its
RB and TCB by setting the following:
- RBOPSWA - Set to the first and second half of the PSW, includes
the key and mask bits as well as the address of the next instruction
after the WAIT macro
- TCBGRS - Set to the general purpose registers (GPRs)
When WAIT is invoked, the caller should hold only the LOCAL
lock. WAIT performs the following functions:
- Stores the ECB/ECBLIST address into the register 1 location of
the TCB register save area (TCBGRS1). User data cannot be passed through
this field or register.
- Releases home's LOCAL lock.
- Returns control to the system (control does not return to the
caller even though all previously pending events have already occurred).
The system ensures that all FRRs have been deleted.
The following registers contain parameters for branch entry to
WAIT:
- Register
- Contents
- 0
- The wait count in the low order byte. When the high order bit
is one, it indicates long-wait (the LONG=YES specification).
- 1
- The ECB pointer value. If only one ECB is being waited on, place
that ECB address in register 1. If a list of ECBs is being waited
on, place the complemented ECBLIST address in register 1.
- 15
- The branch entry address to WAIT (obtained from the CVT field
CVTVWAIT).
You can use branch entry to the WAIT service routine in cross memory
mode if you hold the LOCAL lock of the home address space and if the
current address space is the home address space.