The RESUME macro, which is supported in cross memory mode, provides an efficient means for indicating
the completion of an event. The RESUME macro specifies
the TCB and RB that were previously suspended by the SUSPEND macro.
The specified TCB and RB must be addressable in the currently addressable
address space. Only routines executing in supervisor state and PSW
key zero can issue the RESUME macro.
The RESUME macro and the service routine it calls must serialize
the use of the task that is being resumed. This serialization might
require the local lock of the task's address space, called the target
address space. Because disabled or locked callers of RESUME are not
allowed to obtain a local lock, the RESUME macro has the MODE and
ASYNC options to handle these types of situations.
Note: The ASYNC parameter for the RESUME macro is spelled
differently from similar parameters on other macros.
The MODE option specifies whether or not the RESUME operation must complete (MODE=UNCOND) or not (MODE=COND).
The ASYNC option specifies whether or not RESUME can schedule an
SRB to perform the resume if necessary. These RESUME options can be
combined in four ways:
- MODE=UNCOND and ASYNC=N
- MODE=UNCOND and ASYNC=Y
- RESUME attempts to obtain the necessary task serialization and
complete the function synchronously. If RESUME cannot obtain serialization,
RESUME does not obtain the local lock. RESUME unconditionally schedules
an SRB to complete the RESUME asynchronously.
- The caller can be enabled or disabled.
- MODE=COND and ASYNC=N
- RESUME attempts to obtain the necessary task serialization to
complete the function synchronously. If serialization is available,
the task is resumed and control returns to the caller. If serialization
is not available, RESUME returns to the caller without completing
the RESUME operation.
- The caller can either be enabled or disabled and can hold any
combination of locks. RESUME does not attempt to obtain any locks.
The caller must be prepared to handle the situation when the RESUME
operation cannot be performed because the necessary serialization
is not available.
- MODE=COND and ASYNC=Y
- RESUME attempts to obtain the necessary serialization to complete
the function synchronously. If serialization is available, the task
is resumed and control returns to the caller. If serialization is
not available, RESUME might schedule an SRB to complete the RESUME
asynchronously.
- The caller can be either enabled or disabled, and can hold any
combination of locks. RESUME does not attempt to obtain any locks.
The caller must be prepared to handle the situation when the RESUME
operation cannot be performed because the necessary serialization
is not available and the RESUME could not be processed asynchronously.
RESUME provides return codes in register 15 to indicate the result
of the RESUME attempt. See the RESUME macro in z/OS MVS Programming: Authorized Assembler Services Reference LLA-SDU for details on the return codes.
The RESUME macro requires that you include the IHAPSA mapping macro.
If the ASCB option is not specified, then the MODE=UNCOND and ASYNC=Y
combination requires that you include the CVT mapping macro.