Title
weak compare-and-exchange confusion II
Status
dup
Section
[atomics.types.operations]
Submitter
Switzerland

Created on 2010-08-25.00:00:00 last changed 167 months ago

Messages

Date: 2011-02-15.21:33:25

[ See 1474 for the proposed resolution ]

Date: 2011-02-15.21:33:25

[ Daniel translates NB comment in a proposed resolution ]

Change [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 expected before the operation is the same that same as that of the object and the same as that of expected after the operationThe weak compare-and-exchange operations may fail spuriously, that is, return false while leaving the contents of memory pointed to by expected 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.

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 ]

Date: 2010-10-29.23:15:08

[ 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."

Date: 2010-10-28.22:49:09

Addresses CH-23

[atomics.types.operations] p. 23: The first sentence has non-English syntax.

History
Date User Action Args
2011-02-15 21:33:25adminsetmessages: + msg5491
2011-02-15 21:33:25adminsetmessages: + msg5490
2010-10-29 23:15:08adminsetmessages: + msg5199
2010-10-28 22:49:09adminsetstatus: open -> dup
2010-10-24 03:04:13adminsetmessages: + msg4961
2010-08-25 00:00:00admincreate