<div dir="ltr">Dear Kim,<div><br></div><div>Reading a volatile field updated by cmpxchg does not need an acquire operation.</div><div><br></div><div>BTW. The specification in atomic.hpp says cmpxchg provides: "<fence> compare-and-exchange <membar StoreLoad|StoreStore>". The release is part of the fence. Are you suggesting that there is a release after the exchange?</div><div><br></div><div>Carsten</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Sep 19, 2016 at 3:18 PM, Kim Barrett <span dir="ltr"><<a href="mailto:kim.barrett@oracle.com" target="_blank">kim.barrett@oracle.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">> On Sep 19, 2016, at 2:26 PM, Carsten Varming <<a href="mailto:varming@gmail.com">varming@gmail.com</a>> wrote:<br>
><br>
> Dear Erik,<br>
><br>
> According to orderAccess.hpp an acquire is supposed to be paired with a release. It doesn't look like there is any synchronization on the data written to the time stamp array, so what exactly is going on?<br>
><br>
> Carsten<br>
<br>
</div></div>_time_stamps gets written with a cmpxchg_ptr (line 63 of gcTaskThread.cpp), which includes release semantics for the write; see atomic.hpp.<br>
<br>
</blockquote></div><br></div>