8225490: Miscellaneous changes imported from jsr166 CVS 2019-09

Reviewed-by: martin, alanb
This commit is contained in:
Doug Lea 2019-09-14 11:26:26 -07:00
parent 9275097a02
commit eb1eadb69f
46 changed files with 622 additions and 640 deletions

View file

@ -38,6 +38,7 @@ package java.util.concurrent.atomic;
import java.lang.invoke.VarHandle;
import java.util.function.IntBinaryOperator;
import java.util.function.IntUnaryOperator;
import jdk.internal.misc.Unsafe;
/**
* An {@code int} value that may be updated atomically. See the
@ -58,8 +59,9 @@ public class AtomicInteger extends Number implements java.io.Serializable {
* This class intended to be implemented using VarHandles, but there
* are unresolved cyclic startup dependencies.
*/
private static final jdk.internal.misc.Unsafe U = jdk.internal.misc.Unsafe.getUnsafe();
private static final long VALUE = U.objectFieldOffset(AtomicInteger.class, "value");
private static final Unsafe U = Unsafe.getUnsafe();
private static final long VALUE
= U.objectFieldOffset(AtomicInteger.class, "value");
private volatile int value;