April 1, 1981
If you have user-defined areas that used by more than one virtual
machine, youwill need to define your own locking conventions. You can
use theLOCK macro to obtain and release a PRIVATE lock. The format of
theLOCK macro is: r- I I (label] I I i
labelOBTAIN RELEASE LOCK {
OBTAIN },TYPE=PRIVATE,[SPIN={YES}][,SAVE] RELEASE NO is any desired use label.
is a required positional operand indicating whether the lock
is to be obtained or released.TY PE=PRI VATE is a required operand that indicates that the lock is a user
lock.SPIN=YESINO SAVE specifies whether control is to be without the lock
being held. The default isSPIN=YES. is an optional keyword that indicates 1, 14 and
15 are to be saved before the rest of the macro expansion.
These are saved in thePSA of the processor that is executinq
this macro. The registers are restored before exit from the
macro expansion.
The condition code (cc) is set as a result of the invocation of theLOCK macro. cc=O OBTAIN - lock obtained RELEASE - lock released
cc=lOBTAIN,SPIN=NO - lock owned by another processor.
A failure to release a lock results in aLOK003 abend.
The address of the lockword must be specified in register 1 and thelockword must be a fullword aligned on a fullword boundary. Spin time
for private locks is kept in theDMKLOKSI timer value for all non-DMKLOK locks. AFFINITY If one processor has a feature that the other processor does not
have, you can tell the system that you always want to execute on thatprocessor. This is done by requesting affi-ni-t-y ,-ei-ther in the d-ireGtory or with a SET AFFINITY command. See the !2£ Q§g[§ for details on the SET AFFINITY command. Part 2. Control Program (CP) 181
If you have user-defined areas that
machine, you
use the
the
label
OBTAIN
is a required positional operand indicating whether the lock
is to be obtained or released.
lock.
being held. The default is
15 are to be saved before the rest of the macro expansion.
These are saved in the
this macro. The registers are restored before exit from the
macro expansion.
The condition code (cc) is set as a result of the invocation of the
cc=l
A failure to release a lock results in a
The address of the lockword must be specified in register 1 and the
for private locks is kept in the
have, you can tell the system that you always want to execute on that