Specifications
Data Structures
1.7 Channel Request Block (CRB)
CRB$L_BUGCHECK2* 120
CRB$L_RTINTD2* (12 bytes) 124
CRB$L_INTD2* (40 bytes) 136
*A read-only field
Table 1–8 Contents of Channel Request Block
Field Name Contents
CRB$L_FQFL Fork queue forward link. The link points to the next entry in the fork queue.
Controller initialization routines write this field when they must drop IPL to
utilize certain executive routines, such as those that allocate memory, that
must be called at a lower IPL. The CRB timeout mechanism also uses the
CRB fork block to lower IPL prior to calling the CRB timeout routine.
CRB$L_FQBL Fork queue backward link. The link points to the previous entry in the fork
queue.
CRB$W_SIZE* Size of CRB. The driver-loading procedure writes this field when it creates
the CRB.
CRB$B_TYPE* Type of data structure. The driver-loading procedure writes the symbolic
constant DYN$C_CRB into this field when it creates the CRB.
CRB$B_FLCK Fork lock at which the controller’s fork operations are synchronized. If it
must use the CRB fork block, a driver either uses a DPT_STORE macro
to initialize this field or explicitly sets its value within the controller
initialization routine.
CRB$L_FPC Address of instruction at which execution resumes when the fork dispatcher
dequeues the fork block. EXE$FORK writes this field when called to suspend
driver execution.
CRB$L_FR3 Value of R3 at the time that the executing code requests creation of a fork
block. EXE$FORK writes this field when called to suspend driver execution.
CRB$L_FR4 Value of R4 at the time that the executing code requests creation of a fork
block. EXE$FORK writes this field when called to suspend driver execution.
CRB$L_WQFL* Controller data channel wait queue forward link. IOC$REQxCHANy and
IOC$RELxCHAN insert and remove driver fork block addresses in this field.
A channel wait queue contains addresses of driver fork blocks that record
the context of suspended drivers waiting to gain control of a controller data
channel. If a channel is busy when a driver requests access to the channel,
IOC$REQxCHANy suspends the driver by saving the driver’s context in the
device’s UCB fork block and inserting the fork block address in the channel
wait queue.
When a driver releases a channel because an I/O operation no longer needs
the channel, IOC$RELxCHAN dequeues a driver fork block, allocates the
channel to the driver, and reactivates the suspended driver fork process. If
no drivers are awaiting the channel, IOC$RELxCHAN clears the channel
busy bit.
(continued on next page)
1–27