# HG changeset patch # User psandoz # Date 1467909043 -7200 # Node ID 697da62a538aadee764e2ff3752a9b817447b578 # Parent 504b835d71a8e20960bf8e9259e25447079c6563 8160885: Unsafe.compareAndExchangeDouble/FloatAcquire should defer to compareAndExchangeLong/IntAcquire Reviewed-by: mhaupt diff -r 504b835d71a8 -r 697da62a538a jdk/src/java.base/share/classes/jdk/internal/misc/Unsafe.java --- a/jdk/src/java.base/share/classes/jdk/internal/misc/Unsafe.java Thu Jul 07 09:38:33 2016 -0300 +++ b/jdk/src/java.base/share/classes/jdk/internal/misc/Unsafe.java Thu Jul 07 18:30:43 2016 +0200 @@ -1709,9 +1709,9 @@ public final float compareAndExchangeFloatAcquire(Object o, long offset, float expected, float x) { - int w = compareAndExchangeIntVolatile(o, offset, - Float.floatToRawIntBits(expected), - Float.floatToRawIntBits(x)); + int w = compareAndExchangeIntAcquire(o, offset, + Float.floatToRawIntBits(expected), + Float.floatToRawIntBits(x)); return Float.intBitsToFloat(w); } @@ -1793,9 +1793,9 @@ public final double compareAndExchangeDoubleAcquire(Object o, long offset, double expected, double x) { - long w = compareAndExchangeLongVolatile(o, offset, - Double.doubleToRawLongBits(expected), - Double.doubleToRawLongBits(x)); + long w = compareAndExchangeLongAcquire(o, offset, + Double.doubleToRawLongBits(expected), + Double.doubleToRawLongBits(x)); return Double.longBitsToDouble(w); }