gtps1m0uSystem Macros

$LOCKC-Lock a Resource

Use this system macro to reserve access to (or lock) a resource and prevent access to it by other I-streams. If the resource is already locked by another I-stream, the I-stream attempting the lock will spin (that is, loop in place) waiting for the lock to be freed. When the lock is freed, this macro locks the resource. If the spin lasts too long, the macro times out and a system error is issued.

Format




label
A symbolic name can be assigned to the macro statement.

IMMED=program_name
Optional. If coded, it is the name of a routine to be given control if the lock is already held by another I-stream. This is in lieu of the spin lock.

LKWORD=field
The name of a doubleword field to be used for lock and trace functions.

TRACE=YES|NO
Specify one of the following:

YES
The current address will be placed in the second fullword of the LKWORD field.

NO
The trace function is skipped.

WKREG
The specified register is used as a work register by the macro.

Entry Requirements

None.

Return Conditions

Programming Considerations

Examples

None.