The mvspause callable service allows a thread to suspend until a signal arrives or some application-defined event is posted.
Operation | Environment |
---|---|
Authorization: | Supervisor state or problem state, any PSW key |
Dispatchable unit mode: | Task - No EUT FRRs |
Cross memory mode: | PASN = HASN |
AMODE (BPX1MP): | 31-bit |
AMODE (BPX4MP): | 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. |
|
AMODE 64 callers use BPX4MP.
The name of a fullword in which the service returns a 0 indicating that an event occurred, or -1 otherwise.
Return_code | Explanation |
---|---|
EFAULT | Error addressing parameters. The parameters on the prior mvspauseinit call were not fully validated at mvspauseinit time. The following reason code unique to the mvspause service can accompany the return code: JRECBStateBad. |
EINTR | The mvspause call was interrupted by a signal. |
EMVSPARM | Incorrect parameters were passed to an MVS™ service. The following reason codes unique to the mvspause service can accompany the return code: JRECBListNotSetup, JRECBStateBad. |
The name of a fullword in which the service routine stores the reason code. The reason code further qualifies the return code value. The mvspause service stores a reason code only when the return value is -1. See z/OS UNIX System Services Messages and Codes for the reason codes.
CALL MVSpauseInit(list of ECB addresses);
for(;;) /* Do forever */
{
call MVSpause()
for(i=1;i<=MaxEcbs;i++)
{
Copy value of Ecb(i)
if (Ecb(i) was posted)
{
Clear Ecb(i)
switch(i)
{
case 1: CALL Signal-Occurred;
break;
case 2: CALL Rtn_for_2nd_Ecb;
break;
case 3: CALL Rtn_for_3rd_Ecb;
break;
... /* As many as are needed */
default: no ECBs POSTed
} /* end switch */
} /* end if */
} /* end for */
if (terminating condition occurred)
break; /* Exit Do Forever loop */
} /* end do forever */
There are no restrictions on the use of the mvspause service.
See BPX1MP (mvspause) example for an example using this callable service.