Specifications
OpenVMS System Routines Called by OpenVMS AXP Device Drivers
IOC$CANCEL_CNT_RES
Return Values
SS$_NORMAL The routine completed successfully.
SS$_BADPARAM The specified CRCTX was not found in the CRAB
wait queue.
Description
IOC$CANCEL_CNT_RES cancels a thread that has been stalled waiting for a
counted resource. The resource request is described in the CRCTX structure; the
counted resource itself is described in the CRAB.
IOC$CANCEL_CNT_RES scans the CRAB wait queue (CRAB$L_WFQL) to locate
the specified CRCTX. If it cannot locate the CRCTX, it returns SS$_BADPARAM
status to its caller.
If it locates the CRCTX in the CRAB wait queue and the resume_flag argument
is not specified or is false, it removes the CRCTX from the queue and returns
SS$_NORMAL status to its caller. Otherwise, after removing the CRCTX, calls
the driver’s callback routine (CRCTX$L_CALLBACK), passing it the following
values:
Location Contents
R0, R21 SS$_CANCEL
R1, R16 Address of CRAB
R2, R17 Address of CRCTX
R3, R18 CRCTX$Q_FR3
R4, R19 CRCTX$Q_FR4
R5, R20 CRCTX$Q_FR5
The callback routine checks R0 to determine whether it has been called with
SS$_NORMAL (from IOC$ALLOC_CNT_RES) or SS$_CANCEL status. If the
latter, it takes appropriate steps to respond to the request cancellation.
When it regains control from the driver callback routine, IOC$CANCEL_CNT_
RES returns SS$_NORMAL status to its caller.
A–13