mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 06:45:07 +02:00
8225490: Miscellaneous changes imported from jsr166 CVS 2019-09
Reviewed-by: martin, alanb
This commit is contained in:
parent
9275097a02
commit
eb1eadb69f
46 changed files with 622 additions and 640 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue