changeset 15001:7791205bea66

8160885: Unsafe.compareAndExchangeDouble/FloatAcquire should defer to compareAndExchangeLong/IntAcquire Reviewed-by: mhaupt
author psandoz
date Thu, 07 Jul 2016 18:30:43 +0200
parents cf7e30f5c03f
children d703b6365f9c
files src/java.base/share/classes/jdk/internal/misc/Unsafe.java
diffstat 1 files changed, 6 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/src/java.base/share/classes/jdk/internal/misc/Unsafe.java	Thu Jul 07 09:38:33 2016 -0300
+++ b/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);
     }