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.
1475. weak compare-and-exchange confusion IISection: 32.5.8.2 [atomics.types.operations] Status: Dup Submitter: Switzerland Opened: 2010-08-25 Last modified: 2016-01-28
Priority: Not Prioritized
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: The weak compare-and-exchange operations may fail spuriously, that is, return false while leaving the contents of memory pointed to by
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 ]expected
before the operation is the same that same as that of theobject
and the same as that ofexpected
after the operation The weak compare-and-exchange operations may fail spuriously, that is, return false while leaving the contents of memory pointed to byexpected
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:
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4