LOCKSTATUS Function

── LOCKSTATUS ── ( ──<interlock designator>── ) ────────────────────────┤
                                                                        

The LOCKSTATUS function returns the status of the specified interlock. The LOCKSTATUS function is of the type REAL, and the result has the following subfields:

Subfield

Description

[47:24]

Owner stack number

0 = no owner stack

[23:22]

Reserved

[01:02]

Current lock state:

0 = free

1 = uncontended

2 = contended

3 = broken

The owner portion of the interlock status can be compared to the function PROCESSID.

Examples of the LOCKSTATUS Function

Examples of the LOCKSTATUS function are as follows:

R := LOCKSTATUS (MYLOCKS[3]);

OWNERID := (R := LOCKSTATUS (YOURLOCK)).[47:24]

R := LOCKSTATUS (CONN_LIB[7].MYLOCK);