changeset 17204:ed1e99c1bba2

Merge
author prr
date Wed, 07 Jun 2017 06:45:09 -0700
parents 92d4889c9b57 (current diff) 915b8df0afbb (diff)
children 67ad6b89dd96
files
diffstat 13 files changed, 393 insertions(+), 393 deletions(-) [+]
line wrap: on
line diff
--- a/src/java.base/share/classes/java/lang/Class.java	Tue Jun 06 14:38:19 2017 +0530
+++ b/src/java.base/share/classes/java/lang/Class.java	Wed Jun 07 06:45:09 2017 -0700
@@ -2880,19 +2880,19 @@
         static <T> boolean casReflectionData(Class<?> clazz,
                                              SoftReference<ReflectionData<T>> oldData,
                                              SoftReference<ReflectionData<T>> newData) {
-            return unsafe.compareAndSwapObject(clazz, reflectionDataOffset, oldData, newData);
+            return unsafe.compareAndSetObject(clazz, reflectionDataOffset, oldData, newData);
         }
 
         static <T> boolean casAnnotationType(Class<?> clazz,
                                              AnnotationType oldType,
                                              AnnotationType newType) {
-            return unsafe.compareAndSwapObject(clazz, annotationTypeOffset, oldType, newType);
+            return unsafe.compareAndSetObject(clazz, annotationTypeOffset, oldType, newType);
         }
 
         static <T> boolean casAnnotationData(Class<?> clazz,
                                              AnnotationData oldData,
                                              AnnotationData newData) {
-            return unsafe.compareAndSwapObject(clazz, annotationDataOffset, oldData, newData);
+            return unsafe.compareAndSetObject(clazz, annotationDataOffset, oldData, newData);
         }
     }
 
--- a/src/java.base/share/classes/java/lang/ClassLoader.java	Tue Jun 06 14:38:19 2017 +0530
+++ b/src/java.base/share/classes/java/lang/ClassLoader.java	Wed Jun 07 06:45:09 2017 -0700
@@ -2884,7 +2884,7 @@
         } catch (NoSuchFieldException e) {
             throw new InternalError(e);
         }
-        return unsafe.compareAndSwapObject(this, offset, null, obj);
+        return unsafe.compareAndSetObject(this, offset, null, obj);
     }
 }
 
--- a/src/java.base/share/classes/java/lang/invoke/X-VarHandle.java.template	Tue Jun 06 14:38:19 2017 +0530
+++ b/src/java.base/share/classes/java/lang/invoke/X-VarHandle.java.template	Wed Jun 07 06:45:09 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -125,7 +125,7 @@
 
         @ForceInline
         static boolean compareAndSet(FieldInstanceReadWrite handle, Object holder, $type$ expected, $type$ value) {
-            return UNSAFE.compareAndSwap$Type$(Objects.requireNonNull(handle.receiverType.cast(holder)),
+            return UNSAFE.compareAndSet$Type$(Objects.requireNonNull(handle.receiverType.cast(holder)),
                                                handle.fieldOffset,
                                                {#if[Object]?handle.fieldType.cast(expected):expected},
                                                {#if[Object]?handle.fieldType.cast(value):value});
@@ -133,7 +133,7 @@
 
         @ForceInline
         static $type$ compareAndExchange(FieldInstanceReadWrite handle, Object holder, $type$ expected, $type$ value) {
-            return UNSAFE.compareAndExchange$Type$Volatile(Objects.requireNonNull(handle.receiverType.cast(holder)),
+            return UNSAFE.compareAndExchange$Type$(Objects.requireNonNull(handle.receiverType.cast(holder)),
                                                handle.fieldOffset,
                                                {#if[Object]?handle.fieldType.cast(expected):expected},
                                                {#if[Object]?handle.fieldType.cast(value):value});
@@ -157,7 +157,7 @@
 
         @ForceInline
         static boolean weakCompareAndSetPlain(FieldInstanceReadWrite handle, Object holder, $type$ expected, $type$ value) {
-            return UNSAFE.weakCompareAndSwap$Type$(Objects.requireNonNull(handle.receiverType.cast(holder)),
+            return UNSAFE.weakCompareAndSet$Type$Plain(Objects.requireNonNull(handle.receiverType.cast(holder)),
                                                handle.fieldOffset,
                                                {#if[Object]?handle.fieldType.cast(expected):expected},
                                                {#if[Object]?handle.fieldType.cast(value):value});
@@ -165,7 +165,7 @@
 
         @ForceInline
         static boolean weakCompareAndSet(FieldInstanceReadWrite handle, Object holder, $type$ expected, $type$ value) {
-            return UNSAFE.weakCompareAndSwap$Type$Volatile(Objects.requireNonNull(handle.receiverType.cast(holder)),
+            return UNSAFE.weakCompareAndSet$Type$(Objects.requireNonNull(handle.receiverType.cast(holder)),
                                                handle.fieldOffset,
                                                {#if[Object]?handle.fieldType.cast(expected):expected},
                                                {#if[Object]?handle.fieldType.cast(value):value});
@@ -173,7 +173,7 @@
 
         @ForceInline
         static boolean weakCompareAndSetAcquire(FieldInstanceReadWrite handle, Object holder, $type$ expected, $type$ value) {
-            return UNSAFE.weakCompareAndSwap$Type$Acquire(Objects.requireNonNull(handle.receiverType.cast(holder)),
+            return UNSAFE.weakCompareAndSet$Type$Acquire(Objects.requireNonNull(handle.receiverType.cast(holder)),
                                                handle.fieldOffset,
                                                {#if[Object]?handle.fieldType.cast(expected):expected},
                                                {#if[Object]?handle.fieldType.cast(value):value});
@@ -181,7 +181,7 @@
 
         @ForceInline
         static boolean weakCompareAndSetRelease(FieldInstanceReadWrite handle, Object holder, $type$ expected, $type$ value) {
-            return UNSAFE.weakCompareAndSwap$Type$Release(Objects.requireNonNull(handle.receiverType.cast(holder)),
+            return UNSAFE.weakCompareAndSet$Type$Release(Objects.requireNonNull(handle.receiverType.cast(holder)),
                                                handle.fieldOffset,
                                                {#if[Object]?handle.fieldType.cast(expected):expected},
                                                {#if[Object]?handle.fieldType.cast(value):value});
@@ -275,7 +275,7 @@
                                        handle.fieldOffset,
                                        value);
         }
-        
+
         @ForceInline
         static $type$ getAndBitwiseXor(FieldInstanceReadWrite handle, Object holder, $type$ value) {
             return UNSAFE.getAndBitwiseXor$Type$(Objects.requireNonNull(handle.receiverType.cast(holder)),
@@ -392,7 +392,7 @@
 
         @ForceInline
         static boolean compareAndSet(FieldStaticReadWrite handle, $type$ expected, $type$ value) {
-            return UNSAFE.compareAndSwap$Type$(handle.base,
+            return UNSAFE.compareAndSet$Type$(handle.base,
                                                handle.fieldOffset,
                                                {#if[Object]?handle.fieldType.cast(expected):expected},
                                                {#if[Object]?handle.fieldType.cast(value):value});
@@ -401,7 +401,7 @@
 
         @ForceInline
         static $type$ compareAndExchange(FieldStaticReadWrite handle, $type$ expected, $type$ value) {
-            return UNSAFE.compareAndExchange$Type$Volatile(handle.base,
+            return UNSAFE.compareAndExchange$Type$(handle.base,
                                                handle.fieldOffset,
                                                {#if[Object]?handle.fieldType.cast(expected):expected},
                                                {#if[Object]?handle.fieldType.cast(value):value});
@@ -425,7 +425,7 @@
 
         @ForceInline
         static boolean weakCompareAndSetPlain(FieldStaticReadWrite handle, $type$ expected, $type$ value) {
-            return UNSAFE.weakCompareAndSwap$Type$(handle.base,
+            return UNSAFE.weakCompareAndSet$Type$Plain(handle.base,
                                                handle.fieldOffset,
                                                {#if[Object]?handle.fieldType.cast(expected):expected},
                                                {#if[Object]?handle.fieldType.cast(value):value});
@@ -433,7 +433,7 @@
 
         @ForceInline
         static boolean weakCompareAndSet(FieldStaticReadWrite handle, $type$ expected, $type$ value) {
-            return UNSAFE.weakCompareAndSwap$Type$Volatile(handle.base,
+            return UNSAFE.weakCompareAndSet$Type$(handle.base,
                                                handle.fieldOffset,
                                                {#if[Object]?handle.fieldType.cast(expected):expected},
                                                {#if[Object]?handle.fieldType.cast(value):value});
@@ -441,7 +441,7 @@
 
         @ForceInline
         static boolean weakCompareAndSetAcquire(FieldStaticReadWrite handle, $type$ expected, $type$ value) {
-            return UNSAFE.weakCompareAndSwap$Type$Acquire(handle.base,
+            return UNSAFE.weakCompareAndSet$Type$Acquire(handle.base,
                                                handle.fieldOffset,
                                                {#if[Object]?handle.fieldType.cast(expected):expected},
                                                {#if[Object]?handle.fieldType.cast(value):value});
@@ -449,7 +449,7 @@
 
         @ForceInline
         static boolean weakCompareAndSetRelease(FieldStaticReadWrite handle, $type$ expected, $type$ value) {
-            return UNSAFE.weakCompareAndSwap$Type$Release(handle.base,
+            return UNSAFE.weakCompareAndSet$Type$Release(handle.base,
                                                handle.fieldOffset,
                                                {#if[Object]?handle.fieldType.cast(expected):expected},
                                                {#if[Object]?handle.fieldType.cast(value):value});
@@ -689,7 +689,7 @@
 #else[Object]
             $type$[] array = ($type$[]) oarray;
 #end[Object]
-            return UNSAFE.compareAndSwap$Type$(array,
+            return UNSAFE.compareAndSet$Type$(array,
                     (((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << handle.ashift) + handle.abase,
                     {#if[Object]?handle.componentType.cast(expected):expected},
                     {#if[Object]?handle.componentType.cast(value):value});
@@ -702,7 +702,7 @@
 #else[Object]
             $type$[] array = ($type$[]) oarray;
 #end[Object]
-            return UNSAFE.compareAndExchange$Type$Volatile(array,
+            return UNSAFE.compareAndExchange$Type$(array,
                     (((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << handle.ashift) + handle.abase,
                     {#if[Object]?handle.componentType.cast(expected):expected},
                     {#if[Object]?handle.componentType.cast(value):value});
@@ -741,7 +741,7 @@
 #else[Object]
             $type$[] array = ($type$[]) oarray;
 #end[Object]
-            return UNSAFE.weakCompareAndSwap$Type$(array,
+            return UNSAFE.weakCompareAndSet$Type$Plain(array,
                     (((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << handle.ashift) + handle.abase,
                     {#if[Object]?handle.componentType.cast(expected):expected},
                     {#if[Object]?handle.componentType.cast(value):value});
@@ -754,7 +754,7 @@
 #else[Object]
             $type$[] array = ($type$[]) oarray;
 #end[Object]
-            return UNSAFE.weakCompareAndSwap$Type$Volatile(array,
+            return UNSAFE.weakCompareAndSet$Type$(array,
                     (((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << handle.ashift) + handle.abase,
                     {#if[Object]?handle.componentType.cast(expected):expected},
                     {#if[Object]?handle.componentType.cast(value):value});
@@ -767,7 +767,7 @@
 #else[Object]
             $type$[] array = ($type$[]) oarray;
 #end[Object]
-            return UNSAFE.weakCompareAndSwap$Type$Acquire(array,
+            return UNSAFE.weakCompareAndSet$Type$Acquire(array,
                     (((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << handle.ashift) + handle.abase,
                     {#if[Object]?handle.componentType.cast(expected):expected},
                     {#if[Object]?handle.componentType.cast(value):value});
@@ -780,7 +780,7 @@
 #else[Object]
             $type$[] array = ($type$[]) oarray;
 #end[Object]
-            return UNSAFE.weakCompareAndSwap$Type$Release(array,
+            return UNSAFE.weakCompareAndSet$Type$Release(array,
                     (((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << handle.ashift) + handle.abase,
                     {#if[Object]?handle.componentType.cast(expected):expected},
                     {#if[Object]?handle.componentType.cast(value):value});
@@ -897,7 +897,7 @@
                                        (((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << handle.ashift) + handle.abase,
                                        value);
         }
-        
+
         @ForceInline
         static $type$ getAndBitwiseXor(Array handle, Object oarray, int index, $type$ value) {
             $type$[] array = ($type$[]) oarray;
--- a/src/java.base/share/classes/java/lang/invoke/X-VarHandleByteArrayView.java.template	Tue Jun 06 14:38:19 2017 +0530
+++ b/src/java.base/share/classes/java/lang/invoke/X-VarHandleByteArrayView.java.template	Wed Jun 07 06:45:09 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -186,7 +186,7 @@
         @ForceInline
         static boolean compareAndSet(ArrayHandle handle, Object oba, int index, $type$ expected, $type$ value) {
             byte[] ba = (byte[]) oba;
-            return UNSAFE.compareAndSwap$RawType$(
+            return UNSAFE.compareAndSet$RawType$(
                     ba,
                     address(ba, index(ba, index)),
                     convEndian(handle.be, expected), convEndian(handle.be, value));
@@ -196,7 +196,7 @@
         static $type$ compareAndExchange(ArrayHandle handle, Object oba, int index, $type$ expected, $type$ value) {
             byte[] ba = (byte[]) oba;
             return convEndian(handle.be,
-                              UNSAFE.compareAndExchange$RawType$Volatile(
+                              UNSAFE.compareAndExchange$RawType$(
                                       ba,
                                       address(ba, index(ba, index)),
                                       convEndian(handle.be, expected), convEndian(handle.be, value)));
@@ -225,7 +225,7 @@
         @ForceInline
         static boolean weakCompareAndSetPlain(ArrayHandle handle, Object oba, int index, $type$ expected, $type$ value) {
             byte[] ba = (byte[]) oba;
-            return UNSAFE.weakCompareAndSwap$RawType$(
+            return UNSAFE.weakCompareAndSet$RawType$Plain(
                     ba,
                     address(ba, index(ba, index)),
                     convEndian(handle.be, expected), convEndian(handle.be, value));
@@ -234,7 +234,7 @@
         @ForceInline
         static boolean weakCompareAndSet(ArrayHandle handle, Object oba, int index, $type$ expected, $type$ value) {
             byte[] ba = (byte[]) oba;
-            return UNSAFE.weakCompareAndSwap$RawType$Volatile(
+            return UNSAFE.weakCompareAndSet$RawType$(
                     ba,
                     address(ba, index(ba, index)),
                     convEndian(handle.be, expected), convEndian(handle.be, value));
@@ -243,7 +243,7 @@
         @ForceInline
         static boolean weakCompareAndSetAcquire(ArrayHandle handle, Object oba, int index, $type$ expected, $type$ value) {
             byte[] ba = (byte[]) oba;
-            return UNSAFE.weakCompareAndSwap$RawType$Acquire(
+            return UNSAFE.weakCompareAndSet$RawType$Acquire(
                     ba,
                     address(ba, index(ba, index)),
                     convEndian(handle.be, expected), convEndian(handle.be, value));
@@ -252,7 +252,7 @@
         @ForceInline
         static boolean weakCompareAndSetRelease(ArrayHandle handle, Object oba, int index, $type$ expected, $type$ value) {
             byte[] ba = (byte[]) oba;
-            return UNSAFE.weakCompareAndSwap$RawType$Release(
+            return UNSAFE.weakCompareAndSet$RawType$Release(
                     ba,
                     address(ba, index(ba, index)),
                     convEndian(handle.be, expected), convEndian(handle.be, value));
@@ -336,7 +336,7 @@
             do {
                 nativeExpectedValue = UNSAFE.get$RawType$Volatile(ba, offset);
                 expectedValue = $RawBoxType$.reverseBytes(nativeExpectedValue);
-            } while (!UNSAFE.weakCompareAndSwap$RawType$Volatile(ba, offset,
+            } while (!UNSAFE.weakCompareAndSet$RawType$(ba, offset,
                     nativeExpectedValue, $RawBoxType$.reverseBytes(expectedValue + delta)));
             return expectedValue;
         }
@@ -389,7 +389,7 @@
             do {
                 nativeExpectedValue = UNSAFE.get$RawType$Volatile(ba, offset);
                 expectedValue = $RawBoxType$.reverseBytes(nativeExpectedValue);
-            } while (!UNSAFE.weakCompareAndSwap$RawType$Volatile(ba, offset,
+            } while (!UNSAFE.weakCompareAndSet$RawType$(ba, offset,
                     nativeExpectedValue, $RawBoxType$.reverseBytes(expectedValue | value)));
             return expectedValue;
         }
@@ -440,7 +440,7 @@
             do {
                 nativeExpectedValue = UNSAFE.get$RawType$Volatile(ba, offset);
                 expectedValue = $RawBoxType$.reverseBytes(nativeExpectedValue);
-            } while (!UNSAFE.weakCompareAndSwap$RawType$Volatile(ba, offset,
+            } while (!UNSAFE.weakCompareAndSet$RawType$(ba, offset,
                     nativeExpectedValue, $RawBoxType$.reverseBytes(expectedValue & value)));
             return expectedValue;
         }
@@ -491,7 +491,7 @@
             do {
                 nativeExpectedValue = UNSAFE.get$RawType$Volatile(ba, offset);
                 expectedValue = $RawBoxType$.reverseBytes(nativeExpectedValue);
-            } while (!UNSAFE.weakCompareAndSwap$RawType$Volatile(ba, offset,
+            } while (!UNSAFE.weakCompareAndSet$RawType$(ba, offset,
                     nativeExpectedValue, $RawBoxType$.reverseBytes(expectedValue ^ value)));
             return expectedValue;
         }
@@ -625,7 +625,7 @@
         @ForceInline
         static boolean compareAndSet(ByteBufferHandle handle, Object obb, int index, $type$ expected, $type$ value) {
             ByteBuffer bb = (ByteBuffer) obb;
-            return UNSAFE.compareAndSwap$RawType$(
+            return UNSAFE.compareAndSet$RawType$(
                     UNSAFE.getObject(bb, BYTE_BUFFER_HB),
                     address(bb, indexRO(bb, index)),
                     convEndian(handle.be, expected), convEndian(handle.be, value));
@@ -635,7 +635,7 @@
         static $type$ compareAndExchange(ByteBufferHandle handle, Object obb, int index, $type$ expected, $type$ value) {
             ByteBuffer bb = (ByteBuffer) obb;
             return convEndian(handle.be,
-                              UNSAFE.compareAndExchange$RawType$Volatile(
+                              UNSAFE.compareAndExchange$RawType$(
                                       UNSAFE.getObject(bb, BYTE_BUFFER_HB),
                                       address(bb, indexRO(bb, index)),
                                       convEndian(handle.be, expected), convEndian(handle.be, value)));
@@ -664,7 +664,7 @@
         @ForceInline
         static boolean weakCompareAndSetPlain(ByteBufferHandle handle, Object obb, int index, $type$ expected, $type$ value) {
             ByteBuffer bb = (ByteBuffer) obb;
-            return UNSAFE.weakCompareAndSwap$RawType$(
+            return UNSAFE.weakCompareAndSet$RawType$Plain(
                     UNSAFE.getObject(bb, BYTE_BUFFER_HB),
                     address(bb, indexRO(bb, index)),
                     convEndian(handle.be, expected), convEndian(handle.be, value));
@@ -673,7 +673,7 @@
         @ForceInline
         static boolean weakCompareAndSet(ByteBufferHandle handle, Object obb, int index, $type$ expected, $type$ value) {
             ByteBuffer bb = (ByteBuffer) obb;
-            return UNSAFE.weakCompareAndSwap$RawType$Volatile(
+            return UNSAFE.weakCompareAndSet$RawType$(
                     UNSAFE.getObject(bb, BYTE_BUFFER_HB),
                     address(bb, indexRO(bb, index)),
                     convEndian(handle.be, expected), convEndian(handle.be, value));
@@ -682,7 +682,7 @@
         @ForceInline
         static boolean weakCompareAndSetAcquire(ByteBufferHandle handle, Object obb, int index, $type$ expected, $type$ value) {
             ByteBuffer bb = (ByteBuffer) obb;
-            return UNSAFE.weakCompareAndSwap$RawType$Acquire(
+            return UNSAFE.weakCompareAndSet$RawType$Acquire(
                     UNSAFE.getObject(bb, BYTE_BUFFER_HB),
                     address(bb, indexRO(bb, index)),
                     convEndian(handle.be, expected), convEndian(handle.be, value));
@@ -691,7 +691,7 @@
         @ForceInline
         static boolean weakCompareAndSetRelease(ByteBufferHandle handle, Object obb, int index, $type$ expected, $type$ value) {
             ByteBuffer bb = (ByteBuffer) obb;
-            return UNSAFE.weakCompareAndSwap$RawType$Release(
+            return UNSAFE.weakCompareAndSet$RawType$Release(
                     UNSAFE.getObject(bb, BYTE_BUFFER_HB),
                     address(bb, indexRO(bb, index)),
                     convEndian(handle.be, expected), convEndian(handle.be, value));
@@ -776,7 +776,7 @@
             do {
                 nativeExpectedValue = UNSAFE.get$RawType$Volatile(base, offset);
                 expectedValue = $RawBoxType$.reverseBytes(nativeExpectedValue);
-            } while (!UNSAFE.weakCompareAndSwap$RawType$Volatile(base, offset,
+            } while (!UNSAFE.weakCompareAndSet$RawType$(base, offset,
                     nativeExpectedValue, $RawBoxType$.reverseBytes(expectedValue + delta)));
             return expectedValue;
         }
@@ -830,7 +830,7 @@
             do {
                 nativeExpectedValue = UNSAFE.get$RawType$Volatile(base, offset);
                 expectedValue = $RawBoxType$.reverseBytes(nativeExpectedValue);
-            } while (!UNSAFE.weakCompareAndSwap$RawType$Volatile(base, offset,
+            } while (!UNSAFE.weakCompareAndSet$RawType$(base, offset,
                     nativeExpectedValue, $RawBoxType$.reverseBytes(expectedValue | value)));
             return expectedValue;
         }
@@ -882,12 +882,12 @@
             do {
                 nativeExpectedValue = UNSAFE.get$RawType$Volatile(base, offset);
                 expectedValue = $RawBoxType$.reverseBytes(nativeExpectedValue);
-            } while (!UNSAFE.weakCompareAndSwap$RawType$Volatile(base, offset,
+            } while (!UNSAFE.weakCompareAndSet$RawType$(base, offset,
                     nativeExpectedValue, $RawBoxType$.reverseBytes(expectedValue & value)));
             return expectedValue;
         }
-        
-        
+
+
         @ForceInline
         static $type$ getAndBitwiseXor(ByteBufferHandle handle, Object obb, int index, $type$ value) {
             ByteBuffer bb = (ByteBuffer) obb;
@@ -935,7 +935,7 @@
             do {
                 nativeExpectedValue = UNSAFE.get$RawType$Volatile(base, offset);
                 expectedValue = $RawBoxType$.reverseBytes(nativeExpectedValue);
-            } while (!UNSAFE.weakCompareAndSwap$RawType$Volatile(base, offset,
+            } while (!UNSAFE.weakCompareAndSet$RawType$(base, offset,
                     nativeExpectedValue, $RawBoxType$.reverseBytes(expectedValue ^ value)));
             return expectedValue;
         }
--- a/src/java.base/share/classes/java/util/concurrent/ConcurrentHashMap.java	Tue Jun 06 14:38:19 2017 +0530
+++ b/src/java.base/share/classes/java/util/concurrent/ConcurrentHashMap.java	Wed Jun 07 06:45:09 2017 -0700
@@ -768,7 +768,7 @@
 
     static final <K,V> boolean casTabAt(Node<K,V>[] tab, int i,
                                         Node<K,V> c, Node<K,V> v) {
-        return U.compareAndSwapObject(tab, ((long)i << ASHIFT) + ABASE, c, v);
+        return U.compareAndSetObject(tab, ((long)i << ASHIFT) + ABASE, c, v);
     }
 
     static final <K,V> void setTabAt(Node<K,V>[] tab, int i, Node<K,V> v) {
@@ -2299,7 +2299,7 @@
         while ((tab = table) == null || tab.length == 0) {
             if ((sc = sizeCtl) < 0)
                 Thread.yield(); // lost initialization race; just spin
-            else if (U.compareAndSwapInt(this, SIZECTL, sc, -1)) {
+            else if (U.compareAndSetInt(this, SIZECTL, sc, -1)) {
                 try {
                     if ((tab = table) == null || tab.length == 0) {
                         int n = (sc > 0) ? sc : DEFAULT_CAPACITY;
@@ -2330,13 +2330,13 @@
     private final void addCount(long x, int check) {
         CounterCell[] as; long b, s;
         if ((as = counterCells) != null ||
-            !U.compareAndSwapLong(this, BASECOUNT, b = baseCount, s = b + x)) {
+            !U.compareAndSetLong(this, BASECOUNT, b = baseCount, s = b + x)) {
             CounterCell a; long v; int m;
             boolean uncontended = true;
             if (as == null || (m = as.length - 1) < 0 ||
                 (a = as[ThreadLocalRandom.getProbe() & m]) == null ||
                 !(uncontended =
-                  U.compareAndSwapLong(a, CELLVALUE, v = a.value, v + x))) {
+                  U.compareAndSetLong(a, CELLVALUE, v = a.value, v + x))) {
                 fullAddCount(x, uncontended);
                 return;
             }
@@ -2354,10 +2354,10 @@
                         sc == rs + MAX_RESIZERS || (nt = nextTable) == null ||
                         transferIndex <= 0)
                         break;
-                    if (U.compareAndSwapInt(this, SIZECTL, sc, sc + 1))
+                    if (U.compareAndSetInt(this, SIZECTL, sc, sc + 1))
                         transfer(tab, nt);
                 }
-                else if (U.compareAndSwapInt(this, SIZECTL, sc,
+                else if (U.compareAndSetInt(this, SIZECTL, sc,
                                              (rs << RESIZE_STAMP_SHIFT) + 2))
                     transfer(tab, null);
                 s = sumCount();
@@ -2378,7 +2378,7 @@
                 if ((sc >>> RESIZE_STAMP_SHIFT) != rs || sc == rs + 1 ||
                     sc == rs + MAX_RESIZERS || transferIndex <= 0)
                     break;
-                if (U.compareAndSwapInt(this, SIZECTL, sc, sc + 1)) {
+                if (U.compareAndSetInt(this, SIZECTL, sc, sc + 1)) {
                     transfer(tab, nextTab);
                     break;
                 }
@@ -2401,7 +2401,7 @@
             Node<K,V>[] tab = table; int n;
             if (tab == null || (n = tab.length) == 0) {
                 n = (sc > c) ? sc : c;
-                if (U.compareAndSwapInt(this, SIZECTL, sc, -1)) {
+                if (U.compareAndSetInt(this, SIZECTL, sc, -1)) {
                     try {
                         if (table == tab) {
                             @SuppressWarnings("unchecked")
@@ -2418,7 +2418,7 @@
                 break;
             else if (tab == table) {
                 int rs = resizeStamp(n);
-                if (U.compareAndSwapInt(this, SIZECTL, sc,
+                if (U.compareAndSetInt(this, SIZECTL, sc,
                                         (rs << RESIZE_STAMP_SHIFT) + 2))
                     transfer(tab, null);
             }
@@ -2459,7 +2459,7 @@
                     i = -1;
                     advance = false;
                 }
-                else if (U.compareAndSwapInt
+                else if (U.compareAndSetInt
                          (this, TRANSFERINDEX, nextIndex,
                           nextBound = (nextIndex > stride ?
                                        nextIndex - stride : 0))) {
@@ -2476,7 +2476,7 @@
                     sizeCtl = (n << 1) - (n >>> 1);
                     return;
                 }
-                if (U.compareAndSwapInt(this, SIZECTL, sc = sizeCtl, sc - 1)) {
+                if (U.compareAndSetInt(this, SIZECTL, sc = sizeCtl, sc - 1)) {
                     if ((sc - 2) != resizeStamp(n) << RESIZE_STAMP_SHIFT)
                         return;
                     finishing = advance = true;
@@ -2601,7 +2601,7 @@
                     if (cellsBusy == 0) {            // Try to attach new Cell
                         CounterCell r = new CounterCell(x); // Optimistic create
                         if (cellsBusy == 0 &&
-                            U.compareAndSwapInt(this, CELLSBUSY, 0, 1)) {
+                            U.compareAndSetInt(this, CELLSBUSY, 0, 1)) {
                             boolean created = false;
                             try {               // Recheck under lock
                                 CounterCell[] rs; int m, j;
@@ -2623,14 +2623,14 @@
                 }
                 else if (!wasUncontended)       // CAS already known to fail
                     wasUncontended = true;      // Continue after rehash
-                else if (U.compareAndSwapLong(a, CELLVALUE, v = a.value, v + x))
+                else if (U.compareAndSetLong(a, CELLVALUE, v = a.value, v + x))
                     break;
                 else if (counterCells != as || n >= NCPU)
                     collide = false;            // At max size or stale
                 else if (!collide)
                     collide = true;
                 else if (cellsBusy == 0 &&
-                         U.compareAndSwapInt(this, CELLSBUSY, 0, 1)) {
+                         U.compareAndSetInt(this, CELLSBUSY, 0, 1)) {
                     try {
                         if (counterCells == as) {// Expand table unless stale
                             CounterCell[] rs = new CounterCell[n << 1];
@@ -2647,7 +2647,7 @@
                 h = ThreadLocalRandom.advanceProbe(h);
             }
             else if (cellsBusy == 0 && counterCells == as &&
-                     U.compareAndSwapInt(this, CELLSBUSY, 0, 1)) {
+                     U.compareAndSetInt(this, CELLSBUSY, 0, 1)) {
                 boolean init = false;
                 try {                           // Initialize table
                     if (counterCells == as) {
@@ -2662,7 +2662,7 @@
                 if (init)
                     break;
             }
-            else if (U.compareAndSwapLong(this, BASECOUNT, v = baseCount, v + x))
+            else if (U.compareAndSetLong(this, BASECOUNT, v = baseCount, v + x))
                 break;                          // Fall back on using base
         }
     }
@@ -2858,7 +2858,7 @@
          * Acquires write lock for tree restructuring.
          */
         private final void lockRoot() {
-            if (!U.compareAndSwapInt(this, LOCKSTATE, 0, WRITER))
+            if (!U.compareAndSetInt(this, LOCKSTATE, 0, WRITER))
                 contendedLock(); // offload to separate method
         }
 
@@ -2876,14 +2876,14 @@
             boolean waiting = false;
             for (int s;;) {
                 if (((s = lockState) & ~WAITER) == 0) {
-                    if (U.compareAndSwapInt(this, LOCKSTATE, s, WRITER)) {
+                    if (U.compareAndSetInt(this, LOCKSTATE, s, WRITER)) {
                         if (waiting)
                             waiter = null;
                         return;
                     }
                 }
                 else if ((s & WAITER) == 0) {
-                    if (U.compareAndSwapInt(this, LOCKSTATE, s, s | WAITER)) {
+                    if (U.compareAndSetInt(this, LOCKSTATE, s, s | WAITER)) {
                         waiting = true;
                         waiter = Thread.currentThread();
                     }
@@ -2908,7 +2908,7 @@
                             return e;
                         e = e.next;
                     }
-                    else if (U.compareAndSwapInt(this, LOCKSTATE, s,
+                    else if (U.compareAndSetInt(this, LOCKSTATE, s,
                                                  s + READER)) {
                         TreeNode<K,V> r, p;
                         try {
--- a/src/java.base/share/classes/java/util/concurrent/atomic/AtomicInteger.java	Tue Jun 06 14:38:19 2017 +0530
+++ b/src/java.base/share/classes/java/util/concurrent/atomic/AtomicInteger.java	Wed Jun 07 06:45:09 2017 -0700
@@ -140,7 +140,7 @@
      * the actual value was not equal to the expected value.
      */
     public final boolean compareAndSet(int expectedValue, int newValue) {
-        return U.compareAndSwapInt(this, VALUE, expectedValue, newValue);
+        return U.compareAndSetInt(this, VALUE, expectedValue, newValue);
     }
 
     /**
@@ -161,7 +161,7 @@
      */
     @Deprecated(since="9")
     public final boolean weakCompareAndSet(int expectedValue, int newValue) {
-        return U.weakCompareAndSwapInt(this, VALUE, expectedValue, newValue);
+        return U.weakCompareAndSetIntPlain(this, VALUE, expectedValue, newValue);
     }
 
     /**
@@ -175,7 +175,7 @@
      * @since 9
      */
     public final boolean weakCompareAndSetPlain(int expectedValue, int newValue) {
-        return U.weakCompareAndSwapInt(this, VALUE, expectedValue, newValue);
+        return U.weakCompareAndSetIntPlain(this, VALUE, expectedValue, newValue);
     }
 
     /**
@@ -473,7 +473,7 @@
      * @since 9
      */
     public final int compareAndExchange(int expectedValue, int newValue) {
-        return U.compareAndExchangeIntVolatile(this, VALUE, expectedValue, newValue);
+        return U.compareAndExchangeInt(this, VALUE, expectedValue, newValue);
     }
 
     /**
@@ -520,7 +520,7 @@
      * @since 9
      */
     public final boolean weakCompareAndSetVolatile(int expectedValue, int newValue) {
-        return U.weakCompareAndSwapIntVolatile(this, VALUE, expectedValue, newValue);
+        return U.weakCompareAndSetInt(this, VALUE, expectedValue, newValue);
     }
 
     /**
@@ -535,7 +535,7 @@
      * @since 9
      */
     public final boolean weakCompareAndSetAcquire(int expectedValue, int newValue) {
-        return U.weakCompareAndSwapIntAcquire(this, VALUE, expectedValue, newValue);
+        return U.weakCompareAndSetIntAcquire(this, VALUE, expectedValue, newValue);
     }
 
     /**
@@ -550,7 +550,7 @@
      * @since 9
      */
     public final boolean weakCompareAndSetRelease(int expectedValue, int newValue) {
-        return U.weakCompareAndSwapIntRelease(this, VALUE, expectedValue, newValue);
+        return U.weakCompareAndSetIntRelease(this, VALUE, expectedValue, newValue);
     }
 
 }
--- a/src/java.base/share/classes/java/util/concurrent/atomic/AtomicIntegerFieldUpdater.java	Tue Jun 06 14:38:19 2017 +0530
+++ b/src/java.base/share/classes/java/util/concurrent/atomic/AtomicIntegerFieldUpdater.java	Wed Jun 07 06:45:09 2017 -0700
@@ -481,12 +481,12 @@
 
         public final boolean compareAndSet(T obj, int expect, int update) {
             accessCheck(obj);
-            return U.compareAndSwapInt(obj, offset, expect, update);
+            return U.compareAndSetInt(obj, offset, expect, update);
         }
 
         public final boolean weakCompareAndSet(T obj, int expect, int update) {
             accessCheck(obj);
-            return U.compareAndSwapInt(obj, offset, expect, update);
+            return U.compareAndSetInt(obj, offset, expect, update);
         }
 
         public final void set(T obj, int newValue) {
--- a/src/java.base/share/classes/java/util/concurrent/atomic/AtomicLong.java	Tue Jun 06 14:38:19 2017 +0530
+++ b/src/java.base/share/classes/java/util/concurrent/atomic/AtomicLong.java	Wed Jun 07 06:45:09 2017 -0700
@@ -56,7 +56,7 @@
 
     /**
      * Records whether the underlying JVM supports lockless
-     * compareAndSwap for longs. While the intrinsic compareAndSwapLong
+     * compareAndSet for longs. While the intrinsic compareAndSetLong
      * method works in either case, some constructions should be
      * handled at Java level to avoid locking user-visible locks.
      */
@@ -119,7 +119,7 @@
      */
     public final void set(long newValue) {
         // Use putLongVolatile instead of ordinary volatile store when
-        // using compareAndSwapLong, for sake of some 32bit systems.
+        // using compareAndSetLong, for sake of some 32bit systems.
         U.putLongVolatile(this, VALUE, newValue);
     }
 
@@ -156,7 +156,7 @@
      * the actual value was not equal to the expected value.
      */
     public final boolean compareAndSet(long expectedValue, long newValue) {
-        return U.compareAndSwapLong(this, VALUE, expectedValue, newValue);
+        return U.compareAndSetLong(this, VALUE, expectedValue, newValue);
     }
 
     /**
@@ -177,7 +177,7 @@
      */
     @Deprecated(since="9")
     public final boolean weakCompareAndSet(long expectedValue, long newValue) {
-        return U.weakCompareAndSwapLong(this, VALUE, expectedValue, newValue);
+        return U.weakCompareAndSetLongPlain(this, VALUE, expectedValue, newValue);
     }
 
     /**
@@ -191,7 +191,7 @@
      * @since 9
      */
     public final boolean weakCompareAndSetPlain(long expectedValue, long newValue) {
-        return U.weakCompareAndSwapLong(this, VALUE, expectedValue, newValue);
+        return U.weakCompareAndSetLongPlain(this, VALUE, expectedValue, newValue);
     }
 
     /**
@@ -487,7 +487,7 @@
      * @since 9
      */
     public final long compareAndExchange(long expectedValue, long newValue) {
-        return U.compareAndExchangeLongVolatile(this, VALUE, expectedValue, newValue);
+        return U.compareAndExchangeLong(this, VALUE, expectedValue, newValue);
     }
 
     /**
@@ -534,7 +534,7 @@
      * @since 9
      */
     public final boolean weakCompareAndSetVolatile(long expectedValue, long newValue) {
-        return U.weakCompareAndSwapLongVolatile(this, VALUE, expectedValue, newValue);
+        return U.weakCompareAndSetLong(this, VALUE, expectedValue, newValue);
     }
 
     /**
@@ -549,7 +549,7 @@
      * @since 9
      */
     public final boolean weakCompareAndSetAcquire(long expectedValue, long newValue) {
-        return U.weakCompareAndSwapLongAcquire(this, VALUE, expectedValue, newValue);
+        return U.weakCompareAndSetLongAcquire(this, VALUE, expectedValue, newValue);
     }
 
     /**
@@ -564,7 +564,7 @@
      * @since 9
      */
     public final boolean weakCompareAndSetRelease(long expectedValue, long newValue) {
-        return U.weakCompareAndSwapLongRelease(this, VALUE, expectedValue, newValue);
+        return U.weakCompareAndSetLongRelease(this, VALUE, expectedValue, newValue);
     }
 
 }
--- a/src/java.base/share/classes/java/util/concurrent/atomic/AtomicLongFieldUpdater.java	Tue Jun 06 14:38:19 2017 +0530
+++ b/src/java.base/share/classes/java/util/concurrent/atomic/AtomicLongFieldUpdater.java	Wed Jun 07 06:45:09 2017 -0700
@@ -454,12 +454,12 @@
 
         public final boolean compareAndSet(T obj, long expect, long update) {
             accessCheck(obj);
-            return U.compareAndSwapLong(obj, offset, expect, update);
+            return U.compareAndSetLong(obj, offset, expect, update);
         }
 
         public final boolean weakCompareAndSet(T obj, long expect, long update) {
             accessCheck(obj);
-            return U.compareAndSwapLong(obj, offset, expect, update);
+            return U.compareAndSetLong(obj, offset, expect, update);
         }
 
         public final void set(T obj, long newValue) {
--- a/src/java.base/share/classes/java/util/concurrent/atomic/AtomicReferenceFieldUpdater.java	Tue Jun 06 14:38:19 2017 +0530
+++ b/src/java.base/share/classes/java/util/concurrent/atomic/AtomicReferenceFieldUpdater.java	Wed Jun 07 06:45:09 2017 -0700
@@ -432,14 +432,14 @@
         public final boolean compareAndSet(T obj, V expect, V update) {
             accessCheck(obj);
             valueCheck(update);
-            return U.compareAndSwapObject(obj, offset, expect, update);
+            return U.compareAndSetObject(obj, offset, expect, update);
         }
 
         public final boolean weakCompareAndSet(T obj, V expect, V update) {
             // same implementation as strong form for now
             accessCheck(obj);
             valueCheck(update);
-            return U.compareAndSwapObject(obj, offset, expect, update);
+            return U.compareAndSetObject(obj, offset, expect, update);
         }
 
         public final void set(T obj, V newValue) {
--- a/src/java.base/share/classes/jdk/internal/misc/Unsafe.java	Tue Jun 06 14:38:19 2017 +0530
+++ b/src/java.base/share/classes/jdk/internal/misc/Unsafe.java	Wed Jun 07 06:45:09 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -1278,55 +1278,55 @@
      * @return {@code true} if successful
      */
     @HotSpotIntrinsicCandidate
-    public final native boolean compareAndSwapObject(Object o, long offset,
-                                                     Object expected,
-                                                     Object x);
+    public final native boolean compareAndSetObject(Object o, long offset,
+                                                    Object expected,
+                                                    Object x);
 
     @HotSpotIntrinsicCandidate
-    public final native Object compareAndExchangeObjectVolatile(Object o, long offset,
-                                                                Object expected,
-                                                                Object x);
+    public final native Object compareAndExchangeObject(Object o, long offset,
+                                                        Object expected,
+                                                        Object x);
 
     @HotSpotIntrinsicCandidate
     public final Object compareAndExchangeObjectAcquire(Object o, long offset,
                                                                Object expected,
                                                                Object x) {
-        return compareAndExchangeObjectVolatile(o, offset, expected, x);
+        return compareAndExchangeObject(o, offset, expected, x);
     }
 
     @HotSpotIntrinsicCandidate
     public final Object compareAndExchangeObjectRelease(Object o, long offset,
                                                                Object expected,
                                                                Object x) {
-        return compareAndExchangeObjectVolatile(o, offset, expected, x);
+        return compareAndExchangeObject(o, offset, expected, x);
     }
 
     @HotSpotIntrinsicCandidate
-    public final boolean weakCompareAndSwapObject(Object o, long offset,
-                                                         Object expected,
-                                                         Object x) {
-        return compareAndSwapObject(o, offset, expected, x);
+    public final boolean weakCompareAndSetObjectPlain(Object o, long offset,
+                                                      Object expected,
+                                                      Object x) {
+        return compareAndSetObject(o, offset, expected, x);
     }
 
     @HotSpotIntrinsicCandidate
-    public final boolean weakCompareAndSwapObjectAcquire(Object o, long offset,
-                                                                Object expected,
-                                                                Object x) {
-        return compareAndSwapObject(o, offset, expected, x);
+    public final boolean weakCompareAndSetObjectAcquire(Object o, long offset,
+                                                        Object expected,
+                                                        Object x) {
+        return compareAndSetObject(o, offset, expected, x);
     }
 
     @HotSpotIntrinsicCandidate
-    public final boolean weakCompareAndSwapObjectRelease(Object o, long offset,
-                                                                Object expected,
-                                                                Object x) {
-        return compareAndSwapObject(o, offset, expected, x);
+    public final boolean weakCompareAndSetObjectRelease(Object o, long offset,
+                                                        Object expected,
+                                                        Object x) {
+        return compareAndSetObject(o, offset, expected, x);
     }
 
     @HotSpotIntrinsicCandidate
-    public final boolean weakCompareAndSwapObjectVolatile(Object o, long offset,
-                                                                Object expected,
-                                                                Object x) {
-        return compareAndSwapObject(o, offset, expected, x);
+    public final boolean weakCompareAndSetObject(Object o, long offset,
+                                                 Object expected,
+                                                 Object x) {
+        return compareAndSetObject(o, offset, expected, x);
     }
 
     /**
@@ -1339,61 +1339,61 @@
      * @return {@code true} if successful
      */
     @HotSpotIntrinsicCandidate
-    public final native boolean compareAndSwapInt(Object o, long offset,
+    public final native boolean compareAndSetInt(Object o, long offset,
+                                                 int expected,
+                                                 int x);
+
+    @HotSpotIntrinsicCandidate
+    public final native int compareAndExchangeInt(Object o, long offset,
                                                   int expected,
                                                   int x);
 
     @HotSpotIntrinsicCandidate
-    public final native int compareAndExchangeIntVolatile(Object o, long offset,
-                                                          int expected,
-                                                          int x);
-
-    @HotSpotIntrinsicCandidate
     public final int compareAndExchangeIntAcquire(Object o, long offset,
                                                          int expected,
                                                          int x) {
-        return compareAndExchangeIntVolatile(o, offset, expected, x);
+        return compareAndExchangeInt(o, offset, expected, x);
     }
 
     @HotSpotIntrinsicCandidate
     public final int compareAndExchangeIntRelease(Object o, long offset,
                                                          int expected,
                                                          int x) {
-        return compareAndExchangeIntVolatile(o, offset, expected, x);
+        return compareAndExchangeInt(o, offset, expected, x);
     }
 
     @HotSpotIntrinsicCandidate
-    public final boolean weakCompareAndSwapInt(Object o, long offset,
-                                                      int expected,
-                                                      int x) {
-        return compareAndSwapInt(o, offset, expected, x);
+    public final boolean weakCompareAndSetIntPlain(Object o, long offset,
+                                                   int expected,
+                                                   int x) {
+        return compareAndSetInt(o, offset, expected, x);
     }
 
     @HotSpotIntrinsicCandidate
-    public final boolean weakCompareAndSwapIntAcquire(Object o, long offset,
-                                                             int expected,
-                                                             int x) {
-        return compareAndSwapInt(o, offset, expected, x);
+    public final boolean weakCompareAndSetIntAcquire(Object o, long offset,
+                                                     int expected,
+                                                     int x) {
+        return compareAndSetInt(o, offset, expected, x);
     }
 
     @HotSpotIntrinsicCandidate
-    public final boolean weakCompareAndSwapIntRelease(Object o, long offset,
-                                                             int expected,
-                                                             int x) {
-        return compareAndSwapInt(o, offset, expected, x);
+    public final boolean weakCompareAndSetIntRelease(Object o, long offset,
+                                                     int expected,
+                                                     int x) {
+        return compareAndSetInt(o, offset, expected, x);
     }
 
     @HotSpotIntrinsicCandidate
-    public final boolean weakCompareAndSwapIntVolatile(Object o, long offset,
-                                                             int expected,
-                                                             int x) {
-        return compareAndSwapInt(o, offset, expected, x);
+    public final boolean weakCompareAndSetInt(Object o, long offset,
+                                              int expected,
+                                              int x) {
+        return compareAndSetInt(o, offset, expected, x);
     }
 
     @HotSpotIntrinsicCandidate
-    public final byte compareAndExchangeByteVolatile(Object o, long offset,
-                                                     byte expected,
-                                                     byte x) {
+    public final byte compareAndExchangeByte(Object o, long offset,
+                                             byte expected,
+                                             byte x) {
         long wordOffset = offset & ~3;
         int shift = (int) (offset & 3) << 3;
         if (BE) {
@@ -1407,64 +1407,64 @@
             fullWord = getIntVolatile(o, wordOffset);
             if ((fullWord & mask) != maskedExpected)
                 return (byte) ((fullWord & mask) >> shift);
-        } while (!weakCompareAndSwapIntVolatile(o, wordOffset,
+        } while (!weakCompareAndSetInt(o, wordOffset,
                                                 fullWord, (fullWord & ~mask) | maskedX));
         return expected;
     }
 
     @HotSpotIntrinsicCandidate
-    public final boolean compareAndSwapByte(Object o, long offset,
-                                            byte expected,
-                                            byte x) {
-        return compareAndExchangeByteVolatile(o, offset, expected, x) == expected;
+    public final boolean compareAndSetByte(Object o, long offset,
+                                           byte expected,
+                                           byte x) {
+        return compareAndExchangeByte(o, offset, expected, x) == expected;
     }
 
     @HotSpotIntrinsicCandidate
-    public final boolean weakCompareAndSwapByteVolatile(Object o, long offset,
-                                                        byte expected,
-                                                        byte x) {
-        return compareAndSwapByte(o, offset, expected, x);
+    public final boolean weakCompareAndSetByte(Object o, long offset,
+                                               byte expected,
+                                               byte x) {
+        return compareAndSetByte(o, offset, expected, x);
     }
 
     @HotSpotIntrinsicCandidate
-    public final boolean weakCompareAndSwapByteAcquire(Object o, long offset,
-                                                       byte expected,
-                                                       byte x) {
-        return weakCompareAndSwapByteVolatile(o, offset, expected, x);
+    public final boolean weakCompareAndSetByteAcquire(Object o, long offset,
+                                                      byte expected,
+                                                      byte x) {
+        return weakCompareAndSetByte(o, offset, expected, x);
     }
 
     @HotSpotIntrinsicCandidate
-    public final boolean weakCompareAndSwapByteRelease(Object o, long offset,
-                                                       byte expected,
-                                                       byte x) {
-        return weakCompareAndSwapByteVolatile(o, offset, expected, x);
+    public final boolean weakCompareAndSetByteRelease(Object o, long offset,
+                                                      byte expected,
+                                                      byte x) {
+        return weakCompareAndSetByte(o, offset, expected, x);
     }
 
     @HotSpotIntrinsicCandidate
-    public final boolean weakCompareAndSwapByte(Object o, long offset,
-                                                        byte expected,
-                                                        byte x) {
-        return weakCompareAndSwapByteVolatile(o, offset, expected, x);
+    public final boolean weakCompareAndSetBytePlain(Object o, long offset,
+                                                    byte expected,
+                                                    byte x) {
+        return weakCompareAndSetByte(o, offset, expected, x);
     }
 
     @HotSpotIntrinsicCandidate
     public final byte compareAndExchangeByteAcquire(Object o, long offset,
                                                     byte expected,
                                                     byte x) {
-        return compareAndExchangeByteVolatile(o, offset, expected, x);
+        return compareAndExchangeByte(o, offset, expected, x);
     }
 
     @HotSpotIntrinsicCandidate
     public final byte compareAndExchangeByteRelease(Object o, long offset,
                                                     byte expected,
                                                     byte x) {
-        return compareAndExchangeByteVolatile(o, offset, expected, x);
+        return compareAndExchangeByte(o, offset, expected, x);
     }
 
     @HotSpotIntrinsicCandidate
-    public final short compareAndExchangeShortVolatile(Object o, long offset,
-                                             short expected,
-                                             short x) {
+    public final short compareAndExchangeShort(Object o, long offset,
+                                               short expected,
+                                               short x) {
         if ((offset & 3) == 3) {
             throw new IllegalArgumentException("Update spans the word, not supported");
         }
@@ -1482,44 +1482,44 @@
             if ((fullWord & mask) != maskedExpected) {
                 return (short) ((fullWord & mask) >> shift);
             }
-        } while (!weakCompareAndSwapIntVolatile(o, wordOffset,
+        } while (!weakCompareAndSetInt(o, wordOffset,
                                                 fullWord, (fullWord & ~mask) | maskedX));
         return expected;
     }
 
     @HotSpotIntrinsicCandidate
-    public final boolean compareAndSwapShort(Object o, long offset,
-                                             short expected,
-                                             short x) {
-        return compareAndExchangeShortVolatile(o, offset, expected, x) == expected;
+    public final boolean compareAndSetShort(Object o, long offset,
+                                            short expected,
+                                            short x) {
+        return compareAndExchangeShort(o, offset, expected, x) == expected;
     }
 
     @HotSpotIntrinsicCandidate
-    public final boolean weakCompareAndSwapShortVolatile(Object o, long offset,
-                                                         short expected,
-                                                         short x) {
-        return compareAndSwapShort(o, offset, expected, x);
+    public final boolean weakCompareAndSetShort(Object o, long offset,
+                                                short expected,
+                                                short x) {
+        return compareAndSetShort(o, offset, expected, x);
     }
 
     @HotSpotIntrinsicCandidate
-    public final boolean weakCompareAndSwapShortAcquire(Object o, long offset,
-                                                        short expected,
-                                                        short x) {
-        return weakCompareAndSwapShortVolatile(o, offset, expected, x);
+    public final boolean weakCompareAndSetShortAcquire(Object o, long offset,
+                                                       short expected,
+                                                       short x) {
+        return weakCompareAndSetShort(o, offset, expected, x);
     }
 
     @HotSpotIntrinsicCandidate
-    public final boolean weakCompareAndSwapShortRelease(Object o, long offset,
-                                                        short expected,
-                                                        short x) {
-        return weakCompareAndSwapShortVolatile(o, offset, expected, x);
+    public final boolean weakCompareAndSetShortRelease(Object o, long offset,
+                                                       short expected,
+                                                       short x) {
+        return weakCompareAndSetShort(o, offset, expected, x);
     }
 
     @HotSpotIntrinsicCandidate
-    public final boolean weakCompareAndSwapShort(Object o, long offset,
-                                                 short expected,
-                                                 short x) {
-        return weakCompareAndSwapShortVolatile(o, offset, expected, x);
+    public final boolean weakCompareAndSetShortPlain(Object o, long offset,
+                                                     short expected,
+                                                     short x) {
+        return weakCompareAndSetShort(o, offset, expected, x);
     }
 
 
@@ -1527,14 +1527,14 @@
     public final short compareAndExchangeShortAcquire(Object o, long offset,
                                                      short expected,
                                                      short x) {
-        return compareAndExchangeShortVolatile(o, offset, expected, x);
+        return compareAndExchangeShort(o, offset, expected, x);
     }
 
     @HotSpotIntrinsicCandidate
     public final short compareAndExchangeShortRelease(Object o, long offset,
                                                     short expected,
                                                     short x) {
-        return compareAndExchangeShortVolatile(o, offset, expected, x);
+        return compareAndExchangeShort(o, offset, expected, x);
     }
 
     @ForceInline
@@ -1548,17 +1548,17 @@
     }
 
     @ForceInline
-    public final boolean compareAndSwapChar(Object o, long offset,
-                                            char expected,
-                                            char x) {
-        return compareAndSwapShort(o, offset, c2s(expected), c2s(x));
+    public final boolean compareAndSetChar(Object o, long offset,
+                                           char expected,
+                                           char x) {
+        return compareAndSetShort(o, offset, c2s(expected), c2s(x));
     }
 
     @ForceInline
-    public final char compareAndExchangeCharVolatile(Object o, long offset,
-                                            char expected,
-                                            char x) {
-        return s2c(compareAndExchangeShortVolatile(o, offset, c2s(expected), c2s(x)));
+    public final char compareAndExchangeChar(Object o, long offset,
+                                             char expected,
+                                             char x) {
+        return s2c(compareAndExchangeShort(o, offset, c2s(expected), c2s(x)));
     }
 
     @ForceInline
@@ -1576,31 +1576,31 @@
     }
 
     @ForceInline
-    public final boolean weakCompareAndSwapCharVolatile(Object o, long offset,
-                                            char expected,
-                                            char x) {
-        return weakCompareAndSwapShortVolatile(o, offset, c2s(expected), c2s(x));
+    public final boolean weakCompareAndSetChar(Object o, long offset,
+                                               char expected,
+                                               char x) {
+        return weakCompareAndSetShort(o, offset, c2s(expected), c2s(x));
     }
 
     @ForceInline
-    public final boolean weakCompareAndSwapCharAcquire(Object o, long offset,
-                                            char expected,
-                                            char x) {
-        return weakCompareAndSwapShortAcquire(o, offset, c2s(expected), c2s(x));
+    public final boolean weakCompareAndSetCharAcquire(Object o, long offset,
+                                                      char expected,
+                                                      char x) {
+        return weakCompareAndSetShortAcquire(o, offset, c2s(expected), c2s(x));
     }
 
     @ForceInline
-    public final boolean weakCompareAndSwapCharRelease(Object o, long offset,
-                                            char expected,
-                                            char x) {
-        return weakCompareAndSwapShortRelease(o, offset, c2s(expected), c2s(x));
+    public final boolean weakCompareAndSetCharRelease(Object o, long offset,
+                                                      char expected,
+                                                      char x) {
+        return weakCompareAndSetShortRelease(o, offset, c2s(expected), c2s(x));
     }
 
     @ForceInline
-    public final boolean weakCompareAndSwapChar(Object o, long offset,
-                                            char expected,
-                                            char x) {
-        return weakCompareAndSwapShort(o, offset, c2s(expected), c2s(x));
+    public final boolean weakCompareAndSetCharPlain(Object o, long offset,
+                                                    char expected,
+                                                    char x) {
+        return weakCompareAndSetShortPlain(o, offset, c2s(expected), c2s(x));
     }
 
     /**
@@ -1653,17 +1653,17 @@
     }
 
     @ForceInline
-    public final boolean compareAndSwapBoolean(Object o, long offset,
-                                               boolean expected,
-                                               boolean x) {
-        return compareAndSwapByte(o, offset, bool2byte(expected), bool2byte(x));
+    public final boolean compareAndSetBoolean(Object o, long offset,
+                                              boolean expected,
+                                              boolean x) {
+        return compareAndSetByte(o, offset, bool2byte(expected), bool2byte(x));
     }
 
     @ForceInline
-    public final boolean compareAndExchangeBooleanVolatile(Object o, long offset,
-                                                        boolean expected,
-                                                        boolean x) {
-        return byte2bool(compareAndExchangeByteVolatile(o, offset, bool2byte(expected), bool2byte(x)));
+    public final boolean compareAndExchangeBoolean(Object o, long offset,
+                                                   boolean expected,
+                                                   boolean x) {
+        return byte2bool(compareAndExchangeByte(o, offset, bool2byte(expected), bool2byte(x)));
     }
 
     @ForceInline
@@ -1681,31 +1681,31 @@
     }
 
     @ForceInline
-    public final boolean weakCompareAndSwapBooleanVolatile(Object o, long offset,
-                                                           boolean expected,
-                                                           boolean x) {
-        return weakCompareAndSwapByteVolatile(o, offset, bool2byte(expected), bool2byte(x));
+    public final boolean weakCompareAndSetBoolean(Object o, long offset,
+                                                  boolean expected,
+                                                  boolean x) {
+        return weakCompareAndSetByte(o, offset, bool2byte(expected), bool2byte(x));
     }
 
     @ForceInline
-    public final boolean weakCompareAndSwapBooleanAcquire(Object o, long offset,
-                                                          boolean expected,
-                                                          boolean x) {
-        return weakCompareAndSwapByteAcquire(o, offset, bool2byte(expected), bool2byte(x));
+    public final boolean weakCompareAndSetBooleanAcquire(Object o, long offset,
+                                                         boolean expected,
+                                                         boolean x) {
+        return weakCompareAndSetByteAcquire(o, offset, bool2byte(expected), bool2byte(x));
     }
 
     @ForceInline
-    public final boolean weakCompareAndSwapBooleanRelease(Object o, long offset,
-                                                          boolean expected,
-                                                          boolean x) {
-        return weakCompareAndSwapByteRelease(o, offset, bool2byte(expected), bool2byte(x));
+    public final boolean weakCompareAndSetBooleanRelease(Object o, long offset,
+                                                         boolean expected,
+                                                         boolean x) {
+        return weakCompareAndSetByteRelease(o, offset, bool2byte(expected), bool2byte(x));
     }
 
     @ForceInline
-    public final boolean weakCompareAndSwapBoolean(Object o, long offset,
-                                                   boolean expected,
-                                                   boolean x) {
-        return weakCompareAndSwapByte(o, offset, bool2byte(expected), bool2byte(x));
+    public final boolean weakCompareAndSetBooleanPlain(Object o, long offset,
+                                                       boolean expected,
+                                                       boolean x) {
+        return weakCompareAndSetBytePlain(o, offset, bool2byte(expected), bool2byte(x));
     }
 
     /**
@@ -1718,21 +1718,21 @@
      * @return {@code true} if successful
      */
     @ForceInline
-    public final boolean compareAndSwapFloat(Object o, long offset,
-                                             float expected,
-                                             float x) {
-        return compareAndSwapInt(o, offset,
+    public final boolean compareAndSetFloat(Object o, long offset,
+                                            float expected,
+                                            float x) {
+        return compareAndSetInt(o, offset,
                                  Float.floatToRawIntBits(expected),
                                  Float.floatToRawIntBits(x));
     }
 
     @ForceInline
-    public final float compareAndExchangeFloatVolatile(Object o, long offset,
-                                                       float expected,
-                                                       float x) {
-        int w = compareAndExchangeIntVolatile(o, offset,
-                                              Float.floatToRawIntBits(expected),
-                                              Float.floatToRawIntBits(x));
+    public final float compareAndExchangeFloat(Object o, long offset,
+                                               float expected,
+                                               float x) {
+        int w = compareAndExchangeInt(o, offset,
+                                      Float.floatToRawIntBits(expected),
+                                      Float.floatToRawIntBits(x));
         return Float.intBitsToFloat(w);
     }
 
@@ -1757,37 +1757,37 @@
     }
 
     @ForceInline
-    public final boolean weakCompareAndSwapFloat(Object o, long offset,
-                                               float expected,
-                                               float x) {
-        return weakCompareAndSwapInt(o, offset,
+    public final boolean weakCompareAndSetFloatPlain(Object o, long offset,
+                                                     float expected,
+                                                     float x) {
+        return weakCompareAndSetIntPlain(o, offset,
                                      Float.floatToRawIntBits(expected),
                                      Float.floatToRawIntBits(x));
     }
 
     @ForceInline
-    public final boolean weakCompareAndSwapFloatAcquire(Object o, long offset,
-                                                      float expected,
-                                                      float x) {
-        return weakCompareAndSwapIntAcquire(o, offset,
+    public final boolean weakCompareAndSetFloatAcquire(Object o, long offset,
+                                                       float expected,
+                                                       float x) {
+        return weakCompareAndSetIntAcquire(o, offset,
                                             Float.floatToRawIntBits(expected),
                                             Float.floatToRawIntBits(x));
     }
 
     @ForceInline
-    public final boolean weakCompareAndSwapFloatRelease(Object o, long offset,
-                                                      float expected,
-                                                      float x) {
-        return weakCompareAndSwapIntRelease(o, offset,
+    public final boolean weakCompareAndSetFloatRelease(Object o, long offset,
+                                                       float expected,
+                                                       float x) {
+        return weakCompareAndSetIntRelease(o, offset,
                                             Float.floatToRawIntBits(expected),
                                             Float.floatToRawIntBits(x));
     }
 
     @ForceInline
-    public final boolean weakCompareAndSwapFloatVolatile(Object o, long offset,
-                                                       float expected,
-                                                       float x) {
-        return weakCompareAndSwapIntVolatile(o, offset,
+    public final boolean weakCompareAndSetFloat(Object o, long offset,
+                                                float expected,
+                                                float x) {
+        return weakCompareAndSetInt(o, offset,
                                              Float.floatToRawIntBits(expected),
                                              Float.floatToRawIntBits(x));
     }
@@ -1802,21 +1802,21 @@
      * @return {@code true} if successful
      */
     @ForceInline
-    public final boolean compareAndSwapDouble(Object o, long offset,
-                                              double expected,
-                                              double x) {
-        return compareAndSwapLong(o, offset,
-                                  Double.doubleToRawLongBits(expected),
-                                  Double.doubleToRawLongBits(x));
+    public final boolean compareAndSetDouble(Object o, long offset,
+                                             double expected,
+                                             double x) {
+        return compareAndSetLong(o, offset,
+                                 Double.doubleToRawLongBits(expected),
+                                 Double.doubleToRawLongBits(x));
     }
 
     @ForceInline
-    public final double compareAndExchangeDoubleVolatile(Object o, long offset,
-                                                         double expected,
-                                                         double x) {
-        long w = compareAndExchangeLongVolatile(o, offset,
-                                                Double.doubleToRawLongBits(expected),
-                                                Double.doubleToRawLongBits(x));
+    public final double compareAndExchangeDouble(Object o, long offset,
+                                                 double expected,
+                                                 double x) {
+        long w = compareAndExchangeLong(o, offset,
+                                        Double.doubleToRawLongBits(expected),
+                                        Double.doubleToRawLongBits(x));
         return Double.longBitsToDouble(w);
     }
 
@@ -1841,37 +1841,37 @@
     }
 
     @ForceInline
-    public final boolean weakCompareAndSwapDouble(Object o, long offset,
-                                                  double expected,
-                                                  double x) {
-        return weakCompareAndSwapLong(o, offset,
+    public final boolean weakCompareAndSetDoublePlain(Object o, long offset,
+                                                      double expected,
+                                                      double x) {
+        return weakCompareAndSetLongPlain(o, offset,
                                      Double.doubleToRawLongBits(expected),
                                      Double.doubleToRawLongBits(x));
     }
 
     @ForceInline
-    public final boolean weakCompareAndSwapDoubleAcquire(Object o, long offset,
-                                                         double expected,
-                                                         double x) {
-        return weakCompareAndSwapLongAcquire(o, offset,
+    public final boolean weakCompareAndSetDoubleAcquire(Object o, long offset,
+                                                        double expected,
+                                                        double x) {
+        return weakCompareAndSetLongAcquire(o, offset,
                                              Double.doubleToRawLongBits(expected),
                                              Double.doubleToRawLongBits(x));
     }
 
     @ForceInline
-    public final boolean weakCompareAndSwapDoubleRelease(Object o, long offset,
-                                                         double expected,
-                                                         double x) {
-        return weakCompareAndSwapLongRelease(o, offset,
+    public final boolean weakCompareAndSetDoubleRelease(Object o, long offset,
+                                                        double expected,
+                                                        double x) {
+        return weakCompareAndSetLongRelease(o, offset,
                                              Double.doubleToRawLongBits(expected),
                                              Double.doubleToRawLongBits(x));
     }
 
     @ForceInline
-    public final boolean weakCompareAndSwapDoubleVolatile(Object o, long offset,
-                                                          double expected,
-                                                          double x) {
-        return weakCompareAndSwapLongVolatile(o, offset,
+    public final boolean weakCompareAndSetDouble(Object o, long offset,
+                                                 double expected,
+                                                 double x) {
+        return weakCompareAndSetLong(o, offset,
                                               Double.doubleToRawLongBits(expected),
                                               Double.doubleToRawLongBits(x));
     }
@@ -1886,55 +1886,55 @@
      * @return {@code true} if successful
      */
     @HotSpotIntrinsicCandidate
-    public final native boolean compareAndSwapLong(Object o, long offset,
-                                                   long expected,
-                                                   long x);
+    public final native boolean compareAndSetLong(Object o, long offset,
+                                                  long expected,
+                                                  long x);
 
     @HotSpotIntrinsicCandidate
-    public final native long compareAndExchangeLongVolatile(Object o, long offset,
-                                                            long expected,
-                                                            long x);
+    public final native long compareAndExchangeLong(Object o, long offset,
+                                                    long expected,
+                                                    long x);
 
     @HotSpotIntrinsicCandidate
     public final long compareAndExchangeLongAcquire(Object o, long offset,
                                                            long expected,
                                                            long x) {
-        return compareAndExchangeLongVolatile(o, offset, expected, x);
+        return compareAndExchangeLong(o, offset, expected, x);
     }
 
     @HotSpotIntrinsicCandidate
     public final long compareAndExchangeLongRelease(Object o, long offset,
                                                            long expected,
                                                            long x) {
-        return compareAndExchangeLongVolatile(o, offset, expected, x);
+        return compareAndExchangeLong(o, offset, expected, x);
     }
 
     @HotSpotIntrinsicCandidate
-    public final boolean weakCompareAndSwapLong(Object o, long offset,
-                                                       long expected,
-                                                       long x) {
-        return compareAndSwapLong(o, offset, expected, x);
+    public final boolean weakCompareAndSetLongPlain(Object o, long offset,
+                                                    long expected,
+                                                    long x) {
+        return compareAndSetLong(o, offset, expected, x);
     }
 
     @HotSpotIntrinsicCandidate
-    public final boolean weakCompareAndSwapLongAcquire(Object o, long offset,
-                                                              long expected,
-                                                              long x) {
-        return compareAndSwapLong(o, offset, expected, x);
+    public final boolean weakCompareAndSetLongAcquire(Object o, long offset,
+                                                      long expected,
+                                                      long x) {
+        return compareAndSetLong(o, offset, expected, x);
     }
 
     @HotSpotIntrinsicCandidate
-    public final boolean weakCompareAndSwapLongRelease(Object o, long offset,
-                                                              long expected,
-                                                              long x) {
-        return compareAndSwapLong(o, offset, expected, x);
+    public final boolean weakCompareAndSetLongRelease(Object o, long offset,
+                                                      long expected,
+                                                      long x) {
+        return compareAndSetLong(o, offset, expected, x);
     }
 
     @HotSpotIntrinsicCandidate
-    public final boolean weakCompareAndSwapLongVolatile(Object o, long offset,
-                                                              long expected,
-                                                              long x) {
-        return compareAndSwapLong(o, offset, expected, x);
+    public final boolean weakCompareAndSetLong(Object o, long offset,
+                                               long expected,
+                                               long x) {
+        return compareAndSetLong(o, offset, expected, x);
     }
 
     /**
@@ -2316,7 +2316,7 @@
         int v;
         do {
             v = getIntVolatile(o, offset);
-        } while (!weakCompareAndSwapIntVolatile(o, offset, v, v + delta));
+        } while (!weakCompareAndSetInt(o, offset, v, v + delta));
         return v;
     }
 
@@ -2325,7 +2325,7 @@
         int v;
         do {
             v = getInt(o, offset);
-        } while (!weakCompareAndSwapIntRelease(o, offset, v, v + delta));
+        } while (!weakCompareAndSetIntRelease(o, offset, v, v + delta));
         return v;
     }
 
@@ -2334,7 +2334,7 @@
         int v;
         do {
             v = getIntAcquire(o, offset);
-        } while (!weakCompareAndSwapIntAcquire(o, offset, v, v + delta));
+        } while (!weakCompareAndSetIntAcquire(o, offset, v, v + delta));
         return v;
     }
 
@@ -2354,7 +2354,7 @@
         long v;
         do {
             v = getLongVolatile(o, offset);
-        } while (!weakCompareAndSwapLongVolatile(o, offset, v, v + delta));
+        } while (!weakCompareAndSetLong(o, offset, v, v + delta));
         return v;
     }
 
@@ -2363,7 +2363,7 @@
         long v;
         do {
             v = getLong(o, offset);
-        } while (!weakCompareAndSwapLongRelease(o, offset, v, v + delta));
+        } while (!weakCompareAndSetLongRelease(o, offset, v, v + delta));
         return v;
     }
 
@@ -2372,7 +2372,7 @@
         long v;
         do {
             v = getLongAcquire(o, offset);
-        } while (!weakCompareAndSwapLongAcquire(o, offset, v, v + delta));
+        } while (!weakCompareAndSetLongAcquire(o, offset, v, v + delta));
         return v;
     }
 
@@ -2381,7 +2381,7 @@
         byte v;
         do {
             v = getByteVolatile(o, offset);
-        } while (!weakCompareAndSwapByteVolatile(o, offset, v, (byte) (v + delta)));
+        } while (!weakCompareAndSetByte(o, offset, v, (byte) (v + delta)));
         return v;
     }
 
@@ -2390,7 +2390,7 @@
         byte v;
         do {
             v = getByte(o, offset);
-        } while (!weakCompareAndSwapByteRelease(o, offset, v, (byte) (v + delta)));
+        } while (!weakCompareAndSetByteRelease(o, offset, v, (byte) (v + delta)));
         return v;
     }
 
@@ -2399,7 +2399,7 @@
         byte v;
         do {
             v = getByteAcquire(o, offset);
-        } while (!weakCompareAndSwapByteAcquire(o, offset, v, (byte) (v + delta)));
+        } while (!weakCompareAndSetByteAcquire(o, offset, v, (byte) (v + delta)));
         return v;
     }
 
@@ -2408,7 +2408,7 @@
         short v;
         do {
             v = getShortVolatile(o, offset);
-        } while (!weakCompareAndSwapShortVolatile(o, offset, v, (short) (v + delta)));
+        } while (!weakCompareAndSetShort(o, offset, v, (short) (v + delta)));
         return v;
     }
 
@@ -2417,7 +2417,7 @@
         short v;
         do {
             v = getShort(o, offset);
-        } while (!weakCompareAndSwapShortRelease(o, offset, v, (short) (v + delta)));
+        } while (!weakCompareAndSetShortRelease(o, offset, v, (short) (v + delta)));
         return v;
     }
 
@@ -2426,7 +2426,7 @@
         short v;
         do {
             v = getShortAcquire(o, offset);
-        } while (!weakCompareAndSwapShortAcquire(o, offset, v, (short) (v + delta)));
+        } while (!weakCompareAndSetShortAcquire(o, offset, v, (short) (v + delta)));
         return v;
     }
 
@@ -2455,7 +2455,7 @@
             // may result in the loop not terminating.
             expectedBits = getIntVolatile(o, offset);
             v = Float.intBitsToFloat(expectedBits);
-        } while (!weakCompareAndSwapIntVolatile(o, offset,
+        } while (!weakCompareAndSetInt(o, offset,
                                                 expectedBits, Float.floatToRawIntBits(v + delta)));
         return v;
     }
@@ -2470,7 +2470,7 @@
             // may result in the loop not terminating.
             expectedBits = getInt(o, offset);
             v = Float.intBitsToFloat(expectedBits);
-        } while (!weakCompareAndSwapIntRelease(o, offset,
+        } while (!weakCompareAndSetIntRelease(o, offset,
                                                expectedBits, Float.floatToRawIntBits(v + delta)));
         return v;
     }
@@ -2485,7 +2485,7 @@
             // may result in the loop not terminating.
             expectedBits = getIntAcquire(o, offset);
             v = Float.intBitsToFloat(expectedBits);
-        } while (!weakCompareAndSwapIntAcquire(o, offset,
+        } while (!weakCompareAndSetIntAcquire(o, offset,
                                                expectedBits, Float.floatToRawIntBits(v + delta)));
         return v;
     }
@@ -2500,7 +2500,7 @@
             // may result in the loop not terminating.
             expectedBits = getLongVolatile(o, offset);
             v = Double.longBitsToDouble(expectedBits);
-        } while (!weakCompareAndSwapLongVolatile(o, offset,
+        } while (!weakCompareAndSetLong(o, offset,
                                                  expectedBits, Double.doubleToRawLongBits(v + delta)));
         return v;
     }
@@ -2515,7 +2515,7 @@
             // may result in the loop not terminating.
             expectedBits = getLong(o, offset);
             v = Double.longBitsToDouble(expectedBits);
-        } while (!weakCompareAndSwapLongRelease(o, offset,
+        } while (!weakCompareAndSetLongRelease(o, offset,
                                                 expectedBits, Double.doubleToRawLongBits(v + delta)));
         return v;
     }
@@ -2530,7 +2530,7 @@
             // may result in the loop not terminating.
             expectedBits = getLongAcquire(o, offset);
             v = Double.longBitsToDouble(expectedBits);
-        } while (!weakCompareAndSwapLongAcquire(o, offset,
+        } while (!weakCompareAndSetLongAcquire(o, offset,
                                                 expectedBits, Double.doubleToRawLongBits(v + delta)));
         return v;
     }
@@ -2551,7 +2551,7 @@
         int v;
         do {
             v = getIntVolatile(o, offset);
-        } while (!weakCompareAndSwapIntVolatile(o, offset, v, newValue));
+        } while (!weakCompareAndSetInt(o, offset, v, newValue));
         return v;
     }
 
@@ -2560,7 +2560,7 @@
         int v;
         do {
             v = getInt(o, offset);
-        } while (!weakCompareAndSwapIntRelease(o, offset, v, newValue));
+        } while (!weakCompareAndSetIntRelease(o, offset, v, newValue));
         return v;
     }
 
@@ -2569,7 +2569,7 @@
         int v;
         do {
             v = getIntAcquire(o, offset);
-        } while (!weakCompareAndSwapIntAcquire(o, offset, v, newValue));
+        } while (!weakCompareAndSetIntAcquire(o, offset, v, newValue));
         return v;
     }
 
@@ -2589,7 +2589,7 @@
         long v;
         do {
             v = getLongVolatile(o, offset);
-        } while (!weakCompareAndSwapLongVolatile(o, offset, v, newValue));
+        } while (!weakCompareAndSetLong(o, offset, v, newValue));
         return v;
     }
 
@@ -2598,7 +2598,7 @@
         long v;
         do {
             v = getLong(o, offset);
-        } while (!weakCompareAndSwapLongRelease(o, offset, v, newValue));
+        } while (!weakCompareAndSetLongRelease(o, offset, v, newValue));
         return v;
     }
 
@@ -2607,7 +2607,7 @@
         long v;
         do {
             v = getLongAcquire(o, offset);
-        } while (!weakCompareAndSwapLongAcquire(o, offset, v, newValue));
+        } while (!weakCompareAndSetLongAcquire(o, offset, v, newValue));
         return v;
     }
 
@@ -2627,7 +2627,7 @@
         Object v;
         do {
             v = getObjectVolatile(o, offset);
-        } while (!weakCompareAndSwapObjectVolatile(o, offset, v, newValue));
+        } while (!weakCompareAndSetObject(o, offset, v, newValue));
         return v;
     }
 
@@ -2636,7 +2636,7 @@
         Object v;
         do {
             v = getObject(o, offset);
-        } while (!weakCompareAndSwapObjectRelease(o, offset, v, newValue));
+        } while (!weakCompareAndSetObjectRelease(o, offset, v, newValue));
         return v;
     }
 
@@ -2645,7 +2645,7 @@
         Object v;
         do {
             v = getObjectAcquire(o, offset);
-        } while (!weakCompareAndSwapObjectAcquire(o, offset, v, newValue));
+        } while (!weakCompareAndSetObjectAcquire(o, offset, v, newValue));
         return v;
     }
 
@@ -2654,7 +2654,7 @@
         byte v;
         do {
             v = getByteVolatile(o, offset);
-        } while (!weakCompareAndSwapByteVolatile(o, offset, v, newValue));
+        } while (!weakCompareAndSetByte(o, offset, v, newValue));
         return v;
     }
 
@@ -2663,7 +2663,7 @@
         byte v;
         do {
             v = getByte(o, offset);
-        } while (!weakCompareAndSwapByteRelease(o, offset, v, newValue));
+        } while (!weakCompareAndSetByteRelease(o, offset, v, newValue));
         return v;
     }
 
@@ -2672,7 +2672,7 @@
         byte v;
         do {
             v = getByteAcquire(o, offset);
-        } while (!weakCompareAndSwapByteAcquire(o, offset, v, newValue));
+        } while (!weakCompareAndSetByteAcquire(o, offset, v, newValue));
         return v;
     }
 
@@ -2696,7 +2696,7 @@
         short v;
         do {
             v = getShortVolatile(o, offset);
-        } while (!weakCompareAndSwapShortVolatile(o, offset, v, newValue));
+        } while (!weakCompareAndSetShort(o, offset, v, newValue));
         return v;
     }
 
@@ -2705,7 +2705,7 @@
         short v;
         do {
             v = getShort(o, offset);
-        } while (!weakCompareAndSwapShortRelease(o, offset, v, newValue));
+        } while (!weakCompareAndSetShortRelease(o, offset, v, newValue));
         return v;
     }
 
@@ -2714,7 +2714,7 @@
         short v;
         do {
             v = getShortAcquire(o, offset);
-        } while (!weakCompareAndSwapShortAcquire(o, offset, v, newValue));
+        } while (!weakCompareAndSetShortAcquire(o, offset, v, newValue));
         return v;
     }
 
@@ -2824,7 +2824,7 @@
         byte current;
         do {
             current = getByteVolatile(o, offset);
-        } while (!weakCompareAndSwapByteVolatile(o, offset,
+        } while (!weakCompareAndSetByte(o, offset,
                                                   current, (byte) (current | mask)));
         return current;
     }
@@ -2834,7 +2834,7 @@
         byte current;
         do {
             current = getByte(o, offset);
-        } while (!weakCompareAndSwapByteRelease(o, offset,
+        } while (!weakCompareAndSetByteRelease(o, offset,
                                                  current, (byte) (current | mask)));
         return current;
     }
@@ -2845,7 +2845,7 @@
         do {
             // Plain read, the value is a hint, the acquire CAS does the work
             current = getByte(o, offset);
-        } while (!weakCompareAndSwapByteAcquire(o, offset,
+        } while (!weakCompareAndSetByteAcquire(o, offset,
                                                  current, (byte) (current | mask)));
         return current;
     }
@@ -2855,7 +2855,7 @@
         byte current;
         do {
             current = getByteVolatile(o, offset);
-        } while (!weakCompareAndSwapByteVolatile(o, offset,
+        } while (!weakCompareAndSetByte(o, offset,
                                                   current, (byte) (current & mask)));
         return current;
     }
@@ -2865,7 +2865,7 @@
         byte current;
         do {
             current = getByte(o, offset);
-        } while (!weakCompareAndSwapByteRelease(o, offset,
+        } while (!weakCompareAndSetByteRelease(o, offset,
                                                  current, (byte) (current & mask)));
         return current;
     }
@@ -2876,7 +2876,7 @@
         do {
             // Plain read, the value is a hint, the acquire CAS does the work
             current = getByte(o, offset);
-        } while (!weakCompareAndSwapByteAcquire(o, offset,
+        } while (!weakCompareAndSetByteAcquire(o, offset,
                                                  current, (byte) (current & mask)));
         return current;
     }
@@ -2886,7 +2886,7 @@
         byte current;
         do {
             current = getByteVolatile(o, offset);
-        } while (!weakCompareAndSwapByteVolatile(o, offset,
+        } while (!weakCompareAndSetByte(o, offset,
                                                   current, (byte) (current ^ mask)));
         return current;
     }
@@ -2896,7 +2896,7 @@
         byte current;
         do {
             current = getByte(o, offset);
-        } while (!weakCompareAndSwapByteRelease(o, offset,
+        } while (!weakCompareAndSetByteRelease(o, offset,
                                                  current, (byte) (current ^ mask)));
         return current;
     }
@@ -2907,7 +2907,7 @@
         do {
             // Plain read, the value is a hint, the acquire CAS does the work
             current = getByte(o, offset);
-        } while (!weakCompareAndSwapByteAcquire(o, offset,
+        } while (!weakCompareAndSetByteAcquire(o, offset,
                                                  current, (byte) (current ^ mask)));
         return current;
     }
@@ -2964,7 +2964,7 @@
         short current;
         do {
             current = getShortVolatile(o, offset);
-        } while (!weakCompareAndSwapShortVolatile(o, offset,
+        } while (!weakCompareAndSetShort(o, offset,
                                                 current, (short) (current | mask)));
         return current;
     }
@@ -2974,7 +2974,7 @@
         short current;
         do {
             current = getShort(o, offset);
-        } while (!weakCompareAndSwapShortRelease(o, offset,
+        } while (!weakCompareAndSetShortRelease(o, offset,
                                                current, (short) (current | mask)));
         return current;
     }
@@ -2985,7 +2985,7 @@
         do {
             // Plain read, the value is a hint, the acquire CAS does the work
             current = getShort(o, offset);
-        } while (!weakCompareAndSwapShortAcquire(o, offset,
+        } while (!weakCompareAndSetShortAcquire(o, offset,
                                                current, (short) (current | mask)));
         return current;
     }
@@ -2995,7 +2995,7 @@
         short current;
         do {
             current = getShortVolatile(o, offset);
-        } while (!weakCompareAndSwapShortVolatile(o, offset,
+        } while (!weakCompareAndSetShort(o, offset,
                                                 current, (short) (current & mask)));
         return current;
     }
@@ -3005,7 +3005,7 @@
         short current;
         do {
             current = getShort(o, offset);
-        } while (!weakCompareAndSwapShortRelease(o, offset,
+        } while (!weakCompareAndSetShortRelease(o, offset,
                                                current, (short) (current & mask)));
         return current;
     }
@@ -3016,7 +3016,7 @@
         do {
             // Plain read, the value is a hint, the acquire CAS does the work
             current = getShort(o, offset);
-        } while (!weakCompareAndSwapShortAcquire(o, offset,
+        } while (!weakCompareAndSetShortAcquire(o, offset,
                                                current, (short) (current & mask)));
         return current;
     }
@@ -3026,7 +3026,7 @@
         short current;
         do {
             current = getShortVolatile(o, offset);
-        } while (!weakCompareAndSwapShortVolatile(o, offset,
+        } while (!weakCompareAndSetShort(o, offset,
                                                 current, (short) (current ^ mask)));
         return current;
     }
@@ -3036,7 +3036,7 @@
         short current;
         do {
             current = getShort(o, offset);
-        } while (!weakCompareAndSwapShortRelease(o, offset,
+        } while (!weakCompareAndSetShortRelease(o, offset,
                                                current, (short) (current ^ mask)));
         return current;
     }
@@ -3047,7 +3047,7 @@
         do {
             // Plain read, the value is a hint, the acquire CAS does the work
             current = getShort(o, offset);
-        } while (!weakCompareAndSwapShortAcquire(o, offset,
+        } while (!weakCompareAndSetShortAcquire(o, offset,
                                                current, (short) (current ^ mask)));
         return current;
     }
@@ -3058,7 +3058,7 @@
         int current;
         do {
             current = getIntVolatile(o, offset);
-        } while (!weakCompareAndSwapIntVolatile(o, offset,
+        } while (!weakCompareAndSetInt(o, offset,
                                                 current, current | mask));
         return current;
     }
@@ -3068,7 +3068,7 @@
         int current;
         do {
             current = getInt(o, offset);
-        } while (!weakCompareAndSwapIntRelease(o, offset,
+        } while (!weakCompareAndSetIntRelease(o, offset,
                                                current, current | mask));
         return current;
     }
@@ -3079,7 +3079,7 @@
         do {
             // Plain read, the value is a hint, the acquire CAS does the work
             current = getInt(o, offset);
-        } while (!weakCompareAndSwapIntAcquire(o, offset,
+        } while (!weakCompareAndSetIntAcquire(o, offset,
                                                current, current | mask));
         return current;
     }
@@ -3100,7 +3100,7 @@
         int current;
         do {
             current = getIntVolatile(o, offset);
-        } while (!weakCompareAndSwapIntVolatile(o, offset,
+        } while (!weakCompareAndSetInt(o, offset,
                                                 current, current & mask));
         return current;
     }
@@ -3110,7 +3110,7 @@
         int current;
         do {
             current = getInt(o, offset);
-        } while (!weakCompareAndSwapIntRelease(o, offset,
+        } while (!weakCompareAndSetIntRelease(o, offset,
                                                current, current & mask));
         return current;
     }
@@ -3121,7 +3121,7 @@
         do {
             // Plain read, the value is a hint, the acquire CAS does the work
             current = getInt(o, offset);
-        } while (!weakCompareAndSwapIntAcquire(o, offset,
+        } while (!weakCompareAndSetIntAcquire(o, offset,
                                                current, current & mask));
         return current;
     }
@@ -3131,7 +3131,7 @@
         int current;
         do {
             current = getIntVolatile(o, offset);
-        } while (!weakCompareAndSwapIntVolatile(o, offset,
+        } while (!weakCompareAndSetInt(o, offset,
                                                 current, current ^ mask));
         return current;
     }
@@ -3141,7 +3141,7 @@
         int current;
         do {
             current = getInt(o, offset);
-        } while (!weakCompareAndSwapIntRelease(o, offset,
+        } while (!weakCompareAndSetIntRelease(o, offset,
                                                current, current ^ mask));
         return current;
     }
@@ -3152,7 +3152,7 @@
         do {
             // Plain read, the value is a hint, the acquire CAS does the work
             current = getInt(o, offset);
-        } while (!weakCompareAndSwapIntAcquire(o, offset,
+        } while (!weakCompareAndSetIntAcquire(o, offset,
                                                current, current ^ mask));
         return current;
     }
@@ -3163,7 +3163,7 @@
         long current;
         do {
             current = getLongVolatile(o, offset);
-        } while (!weakCompareAndSwapLongVolatile(o, offset,
+        } while (!weakCompareAndSetLong(o, offset,
                                                 current, current | mask));
         return current;
     }
@@ -3173,7 +3173,7 @@
         long current;
         do {
             current = getLong(o, offset);
-        } while (!weakCompareAndSwapLongRelease(o, offset,
+        } while (!weakCompareAndSetLongRelease(o, offset,
                                                current, current | mask));
         return current;
     }
@@ -3184,7 +3184,7 @@
         do {
             // Plain read, the value is a hint, the acquire CAS does the work
             current = getLong(o, offset);
-        } while (!weakCompareAndSwapLongAcquire(o, offset,
+        } while (!weakCompareAndSetLongAcquire(o, offset,
                                                current, current | mask));
         return current;
     }
@@ -3194,7 +3194,7 @@
         long current;
         do {
             current = getLongVolatile(o, offset);
-        } while (!weakCompareAndSwapLongVolatile(o, offset,
+        } while (!weakCompareAndSetLong(o, offset,
                                                 current, current & mask));
         return current;
     }
@@ -3204,7 +3204,7 @@
         long current;
         do {
             current = getLong(o, offset);
-        } while (!weakCompareAndSwapLongRelease(o, offset,
+        } while (!weakCompareAndSetLongRelease(o, offset,
                                                current, current & mask));
         return current;
     }
@@ -3215,7 +3215,7 @@
         do {
             // Plain read, the value is a hint, the acquire CAS does the work
             current = getLong(o, offset);
-        } while (!weakCompareAndSwapLongAcquire(o, offset,
+        } while (!weakCompareAndSetLongAcquire(o, offset,
                                                current, current & mask));
         return current;
     }
@@ -3225,7 +3225,7 @@
         long current;
         do {
             current = getLongVolatile(o, offset);
-        } while (!weakCompareAndSwapLongVolatile(o, offset,
+        } while (!weakCompareAndSetLong(o, offset,
                                                 current, current ^ mask));
         return current;
     }
@@ -3235,7 +3235,7 @@
         long current;
         do {
             current = getLong(o, offset);
-        } while (!weakCompareAndSwapLongRelease(o, offset,
+        } while (!weakCompareAndSetLongRelease(o, offset,
                                                current, current ^ mask));
         return current;
     }
@@ -3246,7 +3246,7 @@
         do {
             // Plain read, the value is a hint, the acquire CAS does the work
             current = getLong(o, offset);
-        } while (!weakCompareAndSwapLongAcquire(o, offset,
+        } while (!weakCompareAndSetLongAcquire(o, offset,
                                                current, current ^ mask));
         return current;
     }
--- a/src/jdk.unsupported/share/classes/sun/misc/Unsafe.java	Tue Jun 06 14:38:19 2017 +0530
+++ b/src/jdk.unsupported/share/classes/sun/misc/Unsafe.java	Wed Jun 07 06:45:09 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -872,7 +872,7 @@
     public final boolean compareAndSwapObject(Object o, long offset,
                                               Object expected,
                                               Object x) {
-        return theInternalUnsafe.compareAndSwapObject(o, offset, expected, x);
+        return theInternalUnsafe.compareAndSetObject(o, offset, expected, x);
     }
 
     /**
@@ -888,7 +888,7 @@
     public final boolean compareAndSwapInt(Object o, long offset,
                                            int expected,
                                            int x) {
-        return theInternalUnsafe.compareAndSwapInt(o, offset, expected, x);
+        return theInternalUnsafe.compareAndSetInt(o, offset, expected, x);
     }
 
     /**
@@ -904,7 +904,7 @@
     public final boolean compareAndSwapLong(Object o, long offset,
                                             long expected,
                                             long x) {
-        return theInternalUnsafe.compareAndSwapLong(o, offset, expected, x);
+        return theInternalUnsafe.compareAndSetLong(o, offset, expected, x);
     }
 
     /**
--- a/test/sun/security/krb5/auto/KdcPolicy.java	Tue Jun 06 14:38:19 2017 +0530
+++ b/test/sun/security/krb5/auto/KdcPolicy.java	Wed Jun 07 06:45:09 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -38,7 +38,7 @@
 
 /*
  * @test
- * @bug 8164656
+ * @bug 8164656 8181461
  * @run main/othervm KdcPolicy udp
  * @run main/othervm KdcPolicy tcp
  * @summary krb5.kdc.bad.policy test
@@ -110,7 +110,7 @@
         // It is possible the real KDC cannot fulfil the request
         // in 3s, so it might fail (either 1st time or 2nd time).
         writeConf(1, 3000, p1, p3);
-        test("a3000c3000c3000|a3000c3000-|a3000c3000c3000-");
+        test("a3000c3000c3000|a3000c3000-|a3000c3000c3000a3000-");
 
         // If a test case won't use a real KDC, it can be sped up.
         writeConf(3, 5, p1, p2);