RFR (XS): 8165860: workgroup classes are missing volatile qualifiers for lock-free code
Erik Österlund
erik.osterlund at oracle.com
Tue Sep 20 08:28:46 UTC 2016
Hi Thomas,
On 2016-09-19 17:00, Thomas Schatzl wrote:
> Hi,
>
> On Mon, 2016-09-19 at 15:50 +0200, Mikael Gerdin wrote:
>> Hi Erik,
>>
>> On 2016-09-19 15:48, Erik Österlund wrote:
>>> Hi,
>>>
>>> Mikael Gerdin noticed a compiler workaround could be done in a
>>> nicer-looking way.
> so just assigning the volatile to the temp is not sufficient to make
> sure the compiler generates code to only read it once?
The problem was more that solaris studio (only) complained that I was
losing the volatile qualifier when I did it the straight forward way
(just assigning from the volatile).
I tried again, and it doesn't seem to complain any longer. I must have
done something slightly different the first time I tried this - sorry
about that.
If you prefer just assign from the volatile, then here is a new webrev
with that variant. I agree that probably looks better.
Full webrev: http://cr.openjdk.java.net/~eosterlund/8165860/webrev.02/
Incremental webrev:
http://cr.openjdk.java.net/~eosterlund/8165860/webrev.01_02/
Thanks,
/Erik
> Thanks,
> Thomas
>
More information about the hotspot-gc-dev
mailing list