When using the SUSPEND RB=CURRENT option, the issuer must hold
the CPU lock, LOCAL lock, or a CML lock. The issuer must remain in
this state until the program initiates the stimulus for event completion
in order not to lose control, which could result in never being redispatched.
Because the issuer must also coordinate the SUSPEND and RESUME sequence,
the event completion must not occur until after the SUSPEND RB=CURRENT
macro takes effect. The caller that is in PSW key 0 supervisor state
and EUT (enabled unlocked task) mode and that uses a local lock to
serialize the SUSPEND and RESUME processing sequence can issue CALLDISP
FRRSTK=SAVE. The CALLDISP routine releases the local lock, which serialized
the SUSPEND/RESUME processing of the caller. Because an EUT FRR exists,
the current FRR stack is saved.
When a Type 1 or Type 6 SVC issues a SUSPEND RB=CURRENT, the top
RB (the caller of the SVC) is suspended. Whenever the SVC exits (via
EXIT PROLOGUE or T6EXIT), the
caller is suspended until RESUME occurs. A TYPE 1 SVC must not issue
the CALLDISP macro or release the LOCAL lock, and it must exit via
its exit mechanism. A Type 6 SVC must not issue the CALLDISP macro
or become enabled, and it also must exit via its exit mechanism.
When a TYPE 2, 3, or 4 SVC issues a SUSPEND RB=CURRENT, the top
RB (the SVC itself) is suspended. The SUSPEND routine returns control
to the SVC. The SVC can continue to execute as long as it remains
locally locked or disabled. Once the SVC releases the LOCAL lock
or enables, an interrupt or a CALLDISP invocation suspends the SVC
until it is resumed. While the SVC is enabled and before it is resumed,
it cannot incur a page fault, issue an SVC, or branch enter any supervisor
service that makes local work ready or places the caller in a wait
state (for example, WAIT, POST, EVENTS, or STATUS).
A program that is using a local lock or a CML lock to serialize
SUSPEND RB=CURRENT must not release the lock before it issues CALLDISP.
A program that uses the CPU lock to serialize SUSPEND RB=CURRENT must
release the CPU lock immediately before it issues CALLDISP.