[concurrency-interest] RFR: 8065804: JEP 171: Clarifications/corrections for fence intrinsics
martinrb at google.com
Wed Dec 17 13:54:26 EST 2014
On Wed, Dec 17, 2014 at 1:28 AM, Peter Levart <peter.levart at gmail.com> wrote:
> On 12/17/2014 03:28 AM, David Holmes wrote:
>> On 17/12/2014 10:06 AM, Martin Buchholz wrote:
>> Hans allows for the nonsensical, in my view, possibility that the load of
>> x.a can happen after the x_init=true store and yet somehow be subject to the
>> ++ and the ensuing store that has to come before the x_init = true.
> Perhaps, he is speaking about why it is dangerous to replace BOTH release
> with just store-store AND acquire with just load-load?
I'm pretty sure he's talking about weakening EITHER.
"""Clearly, and unsurprisingly, it is unsafe to replace the
load_acquire with a version that restricts only load ordering in this
case. That would allow the store to x in thread 2 to become visible
before the initialization of x by thread 1 is complete, possibly
losing the update, or corrupting the state of x during initialization.
More interestingly, it is also generally unsafe to restrict the
release ordering constraint in thread 1 to only stores."""
(What's "clear and unsurprising" to Hans may not be to the rest of us)
More information about the Concurrency-interest