An interlock, or an interlock array element, protects a resource that is shared by several participating processes. Using an interlock with the LOCK and UNLOCK functions is similar to using an event with the PROCURE and LIBERATE statements. Using interlocks, however, can significantly improve the run-time performance, compared with using the PROCURE and LIBERATE statements on events.
<interlock declaration>
┌◄────────── , ──────────┐ ──┬───────────┬─ INTERLOCK ─┴─<interlock identifier>─┴─────────────────┤ ├─ PRIVATE ─┤ └─ PUBLIC ──┘
<interlock identifier>
──<identifier>─────────────────────────────────────────────────────────┤
<interlock array declaration>
──┬───────────┬─ INTERLOCK ARRAY ──────────────────────────────────────► ├─ PRIVATE ─┤ └─ PUBLIC ──┘ ┌◄───────────────────────────── , ─────────────────────────────┐ │ ┌◄───────────── , ─────────────┐ │ ►─┴─┴─<interlock array identifier>─┴─ [ ──<bound pair list>── ] ─┴─────┤
<interlock array identifier>
──<identifier>─────────────────────────────────────────────────────────┤
The PRIVATE and PUBLIC specifiers can only be used for interlocks and interlock arrays that are declared within a structure block or a connection block. The PRIVATE specifier limits visibility of the interlock or interlock array to the scope of the structure block or the connection block. A PRIVATE interlock or interlock array element cannot be accessed using a structure or connection block qualifier. The PUBLIC specifier allows the interlock or interlock array element to be accessed using a structure or connection block qualifier. If neither PRIVATE nor PUBLIC is specified, the default value is PUBLIC and access to the interlock or interlock array element using a structure or connection block qualifier is allowed.
The initial state of an interlock is FREE. For a complete list of the possible states of an interlock, refer to LOCKSTATUS Function.

