Specifications
System Macros Invoked by Drivers
LOCK_SYSTEM_PAGES
• If it specified the ipl argument to the LOCK_SYSTEM_PAGES macro, the
code segment must restore the previous IPL, either explicitly, through the use
of the ipl argument to the UNLOCK_SYSTEM_PAGES macro, or through the
use of one of the system synchronization macros.
Example
TSTB (R0) ; Fault in page
30$: LOCK_SYSTEM_PAGES,-
END=100$ ; Lock down pages
LOCK LOCKNAME=MMG,- ; Synch with MMG
SAVIPL=-(SP) ; Save current IPL
MOVL W^MMG$GL_SYSPHD,R3 ; Get system PHD
.
.
.
UNLOCK LOCKNAME=MMG,- ; Unlock MMG
NEWIPL=(SP)+ ; Restore IPL
UNLOCK_SYSTEM_PAGES ; Unlock pages
100$:
In this example, the LOCK_SYSTEM_PAGES macro locks all pages between
labels 30$ and 100$ into the system working set. The UNLOCK_SYSTEM_
PAGES macro does the coroutine return to unlock those pages locked by the
LOCK_SYSTEM_PAGES macro call.
2–49