jdk/src/java.base/share/classes/java/util/concurrent/atomic/AtomicIntegerFieldUpdater.java
equal
deleted
inserted
replaced
479 obj.getClass().getName())); |
479 obj.getClass().getName())); |
480 } |
480 } |
481 |
481 |
482 public final boolean compareAndSet(T obj, int expect, int update) { |
482 public final boolean compareAndSet(T obj, int expect, int update) { |
483 accessCheck(obj); |
483 accessCheck(obj); |
484 return U.compareAndSwapInt(obj, offset, expect, update); |
484 return U.compareAndSetInt(obj, offset, expect, update); |
485 } |
485 } |
486 |
486 |
487 public final boolean weakCompareAndSet(T obj, int expect, int update) { |
487 public final boolean weakCompareAndSet(T obj, int expect, int update) { |
488 accessCheck(obj); |
488 accessCheck(obj); |
489 return U.compareAndSwapInt(obj, offset, expect, update); |
489 return U.compareAndSetInt(obj, offset, expect, update); |
490 } |
490 } |
491 |
491 |
492 public final void set(T obj, int newValue) { |
492 public final void set(T obj, int newValue) { |
493 accessCheck(obj); |
493 accessCheck(obj); |
494 U.putIntVolatile(obj, offset, newValue); |
494 U.putIntVolatile(obj, offset, newValue); |