Specifications
System Macros Invoked by Drivers
DEVICEUNLOCK
Example
DEVICELOCK -
LOCKADDR=UCB$L_DLCK(R5),- ;Lock device access
CONDITION=NOSETIPL,- ;Do not set IPL
PRESERVE=NO ;Do not preserve R0
.
.
.
20$: MOVQ UCB$L_FR3(R5),R3 ;Restore driver context
JSB @UCB$L_FPC(R5) ;Call driver at interrupt return address
40$: DEVICEUNLOCK -
LOCKADDR=UCB$L_DLCK(R5),- ;Unlock device access
PRESERVE=NO ;Do not preserve R0
When the device interrupts, DLDRIVER’s interrupt service routine immediately
obtains the device lock so that it can examine device registers and preserve their
contents. It then calls the driver’s start-I/O routine at the location in which it
initiated device activity. The routine forks and returns control to the interrupt
service routine, which releases the device lock.
2–20