13-272r1 From: Bill Long To: J3 Date: 2013 June 24 Subject: OLD argument in ATOMIC intrinsics in TS 18508 References : N1967, 10-007r1 Discussion ---------- The OLD argument in the ATOMIC intrinsics is assigned the old value of the ATOM variable just before the atomic operation takes place. Assignment of the value to OLD is not part of the atomic operation itself. Edits are included to clarify this. Edits to N1967 (TS 18508 draft) -------------------------------------- [15:9+] Add a new subclause after 7.1 General "7.2 Atomic subroutines An atomic subroutine is an intrinsic subroutine that performs an action on its ATOM argument atomically. The effect of executing an atomic subroutine is as if the subroutine were executed instantaneously, thus not overlapping other atomic actions that might occur asynchronously. The sequence of atomic actions within ordered segments is specified in 2.3.5 of ISO/IEC 1539-1:2010. How sequences of atomic actions in unordered segments interleave with each other is processor dependent. For invocation of an atomic subroutine with an argument OLD, the assignment of the value to OLD is not part of the atomic action." [16:7] In 7.3.1 change "becomes" to "is". [16:21] In 7.3.2 change "becomes" to "is". [16:35] In 7.3.3 change "becomes" to "is". [17:10] In 7.3.4 change "becomes" to "is". [17:23] In 7.3.5 change "becomes" to "is". [28:9+] Add a new edit to 8.6 Edits to clause 13: "{In 13.1 Classes of intrinsic procedures, append the following text to the end of paragraph 3} For invocation of an atomic subroutine with an argument OLD, the assignment of the value to OLD is not part of the atomic action."