RFR(XS): make shared variables volatile
Andrew Haley
aph at redhat.com
Thu Sep 22 15:04:39 UTC 2016
On 21/09/16 15:47, Aleksey Shipilev wrote:
> On 09/21/2016 04:40 PM, Zhengyu Gu wrote:
>> http://cr.openjdk.java.net/~zgu/volatile/webrev.01/
>
> +1
>
> I wonder if this means we should update/poll these volatile variables
> with Atomic::* too, at least for the benefit of weak arches like AArch64.
Always. volatile is never sufficient for variables accessed racily by
multiple threads, and in C++11 it's undefined behaviour. I remember
finding and fixing a couple of these when I did the AArch64 Shenandoah
port.
Andrew.
More information about the shenandoah-dev
mailing list