Specifications
Operating System Routines
IOC$ALOUBAMAP, IOC$ALOUBAMAPN
Description
IOC$ALOUBAMAP and IOC$ALOUBAMAPN allocate a contiguous set of
UNIBUS map registers or a set of the first 496 Q22–bus map registers and record
the allocation in the ADP and CRB. These routines differ in the way in which
they determine the number of the map registers they allocate:
• IOC$ALOUBAMAP calculates the number of needed map registers using
the values contained in UCB$W_BCNT and UCB$W_BOFF. It automatically
allocates one extra map register. When it is later called by the driver,
IOC$LOADUBAMAP marks this register invalid to prevent a transfer
overrun.
• IOC$ALOUBAMAPN uses the value in R3 as the number of required
registers.
If an odd number of map registers is required, both routines round this value up
to an even multiple.
If map registers have been permanently allocated to the controller,
IOC$ALOUBAMAP or IOC$ALOUBAMAPN returns successfully to its caller
without allocating the requested map registers. Otherwise, it searches the map
register descriptor arrays for the required number of map registers. If there
are not enough contiguous map registers available, the routine returns an error
status of zero to its caller.
Device drivers generally obtain UNIBUS map registers or a set of the
first 496 Q22–bus map registers by calling IOC$REQMAPREG which calls
IOC$ALOUBAMAP to do the actual allocating. If registers are not available,
IOC$REQMAPREG places the process on the map register wait queue and does
not return to the caller until sufficient registers have been allocated.
3–76