Specifications
Operating System Routines
SMP$ACQUIREL
SMP$ACQUIREL
Acquires a device lock and enforces the appropriate IPL synchronization on the
local processor.
Module
SPINLOCKS
Macro
DEVICELOCK
Input
Location Contents
R0 Address of device lock
Output
Location Contents
R0 Address of device lock
Synchronization
When calling SMP$ACQUIREL, the local processor should be executing at an
IPL less than or equal to the synchronization IPL of the device lock. The routine,
if necessary, immediately raises IPL to the synchronization IPL of the device
lock. Violations of IPL synchronization result in a SPLIPLHIGH bugcheck if
full-checking multiprocessing is enabled.
In a full-checking multiprocessing environment, if it must spin wait for the
requested lock to be released by another processor, SMP$ACQUIREL temporarily
restores the original IPL for the duration of the wait. If the original IPL
was less than IPL$_RESCHED, the spin wait occurs at IPL$_RESCHED.
SMP$ACQUIREL exits with IPL at the device lock’s synchronization IPL and the
device lock held.
Description
The DEVICELOCK macro calls SMP$ACQUIREL when NOSETIPL is not
specified as its condition argument.
SMP$ACQUIREL, having ensured that IPL has been set to the device lock’s
synchronization IPL, attempts to acquire the requested device lock, allowing the
acquisition to succeed if the local processor already holds the lock or if the lock is
unowned.
If the lock is unowned, the routine increments by 1 a counter that records the
acquisition level. Each additional (or nested) acquisition of this lock by the
owning processor again increments this counter.
If the lock is owned by another processor, the local processor spin waits until the
lock is released.
3–152