RFR (XXS): 8033545: Missing volatile specifier in Bitmap::par_put_range_within_word
thomas.schatzl at oracle.com
Wed Feb 5 01:35:26 PST 2014
thanks for the review.
On Wed, 2014-02-05 at 10:08 +0100, Bengt Rutisson wrote:
> Hi Thomas and Matthias,
> The change looks good.
> But just to be clear. The original suggestion was to make pw volatile,
> but instead you fixed it by using the return value of
> Atomic::cmpxchg_ptr(). I think that is fine, but I wanted to make sure
That's true, it has been solved differently, with the same effect.
Atomic:cmpxchg_ptr() already returns the original value, so there is no
need to reload it from the source (using the volatile pointer).
That's actually a very common pattern in other uses.
In the places I tracked down in the other CR this should (imo) be the
recommended way to fix the issues.
> that I understood the fix properly. Or did I miss something? If my
> understanding is correct we should maybe update the CR with a comment
> saying that it was fixed in a different way.
> Thanks for filing the CR to track down similar issues.
More information about the hotspot-gc-dev