This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of Dup status.
Section: 32.5.8.2 [atomics.types.operations] Status: Dup Submitter: Switzerland Opened: 2010-08-25 Last modified: 2016-01-28
Priority: Not Prioritized
View other active issues in [atomics.types.operations].
View all other issues in [atomics.types.operations].
View all issues with Dup status.
Duplicate of: 1474
Discussion:
Addresses CH-23
32.5.8.2 [atomics.types.operations] p. 23: The first sentence has non-English syntax.
[ Resolution proposed in ballot comment: ]
Change to "The weak compare-and-exchange operations may fail spuriously, that is, return false while leaving the contents of memory pointed to by expected unchanged."
[ Daniel translates NB comment in a proposed resolution ]
Change 32.5.8.2 [atomics.types.operations] p. 23 as indicated:
23 Remark:
When a compare-and-exchange is in a loop, the weak version will yield better performance on some platforms. When a weak compare-and-exchange would require a loop and a strong one would not, the strong one is preferable. — end note ]The weak compare-and-exchange operations may fail spuriously, that is, return false while leaving the contents of memory pointed to byThe weak compare-and-exchange operations may fail spuriously, that is, return false while leaving the contents of memory pointed to byexpected
before the operation is the same that same as that of theobject
and the same as that ofexpected
after the operationexpected
unchanged.. [ Note: This spurious failure enables implementation of compare-and-exchange on a broader class of machines, e.g., loadlocked store-conditional machines. A consequence of spurious failure is that nearly all uses of weak compare-and-exchange will be in a loop.
[ See 1474(i) for the proposed resolution ]
Proposed resolution: