09-143r3 To: J3 From: Bill Long Subject: UTI 161 - LOCK_TYPE, C13 Date: 2009 February 12 References: 09-007, 09-102, 09-142 Discussion: Background information on lock variables is contained in paper 09-142. UTI 161 discusses the LOCK_TYPE subclause 13.8.2.16. The only constant available is LOCK_TYPE(). There are no named constants specified in the standard for this type. The information about lock type values is moved from 6.2.2 to this subbclause. ------------ Edits to 09-007: [404:21-22] In 13.8.2.16 LOCK_TYPE, replace the third sentence (Variables ... unlocked.) with "All components have default initialization." [404:22-23] Delete the last three sentences (Variables of type ... (6.2.2).) [404:23+] Add a new paragraph: "A scalar variable of type LOCK_TYPE is a lock variable. A lock variable can have one of two states: locked and unlocked. The unlocked state is represented by the one value that is the initial value of a LOCK_TYPE variable; this is the value specified by the structure constructor LOCK_TYPE(). The locked state is represented by all other values. The value of a lock variable can be changed with the LOCK and UNLOCK statements (8.5.5). Cxxx A named variable of type LOCK_TYPE shall be a coarray. A variable with a LOCK_TYPE subcomponent shall be a coarray. Cxxy A lock variable shall not appear in a variable definition context except as the in a LOCK or UNLOCK statement." [404:23++] Add a new Note: "Note 13.xx The restrictions against changing a lock variable except via the LOCK and UNLOCK statements ensure the integrity of its value and facilitate efficient implementation, particularly when special synchronization is needed for correct lock operation."