Specifications
Operating System Routines
IOC$RELMAPREG
Description
A driver fork process calls IOC$RELMAPREG to release a previously allocated
set of UNIBUS map registers or a set of the first 496 Q22–bus map registers.
IOC$RELMAPREG updates the alternate map register descriptor arrays in the
ADP. IOC$RELMAPREG assumes that its caller is the current owner of the
controller data channel.
IOC$RELMAPREG obtains the location and number of the allocated map
registers from CRB$L_INTD+VEC$W_MAPREG and CRB$L_INTD+VEC$B_
NUMREG, respectively. If VEC$V_MAPLOCK is set in CRB$L_INTD+VEC$W_
MAPREG, the map registers have been permanently allocated to the controller
and IOC$RELMAPREG returns successfully to its caller.
After adjusting the map register descriptor arrays, IOC$RELMAPREG examines
the standard-map-register wait queue. If the queue is empty, IOC$RELMAPREG
returns successfully to its caller. If the queue contains waiting fork processes,
IOC$RELMAPREG dequeues the first process and calls IOC$ALOUBAMAP to
attempt to allocate the set of map registers it requires.
If there are sufficient map registers, IOC$RELMAPREG restores R3 through
R5 to the process and reactivates it. When this fork process returns control to
IOC$RELMAPREG, IOC$RELMAPREG attempts to allocate map registers to the
next waiting fork process. IOC$RELMAPREG continues to allocate map registers
in this manner until the standard-map-register wait queue is empty or it cannot
satisfy the requirements of the process at the head of the queue. In the latter
event, IOC$RELMAPREG reinserts the fork process’s UCB in the queue and
returns successfully to its caller.
3–120