/libcore/jsr166-tests/src/test/java/jsr166/ |
D | AtomicLongFieldUpdaterTest.java | 50 assertTrue(a.compareAndSet(this, 1, 2)); in checkCompareAndSetProtectedSub() 51 assertTrue(a.compareAndSet(this, 2, -4)); in checkCompareAndSetProtectedSub() 53 assertFalse(a.compareAndSet(this, -5, 7)); in checkCompareAndSetProtectedSub() 55 assertTrue(a.compareAndSet(this, -4, 7)); in checkCompareAndSetProtectedSub() 67 assertTrue(a.compareAndSet(obj, 72L, 73L)); in checkPackageAccess() 173 assertTrue(a.compareAndSet(this, 1, 2)); in testCompareAndSet() 174 assertTrue(a.compareAndSet(this, 2, -4)); in testCompareAndSet() 176 assertFalse(a.compareAndSet(this, -5, 7)); in testCompareAndSet() 178 assertTrue(a.compareAndSet(this, -4, 7)); in testCompareAndSet() 190 assertTrue(a.compareAndSet(this, 1, 2)); in testCompareAndSetProtected() [all …]
|
D | AtomicIntegerFieldUpdaterTest.java | 50 assertTrue(a.compareAndSet(this, 1, 2)); in checkCompareAndSetProtectedSub() 51 assertTrue(a.compareAndSet(this, 2, -4)); in checkCompareAndSetProtectedSub() 53 assertFalse(a.compareAndSet(this, -5, 7)); in checkCompareAndSetProtectedSub() 55 assertTrue(a.compareAndSet(this, -4, 7)); in checkCompareAndSetProtectedSub() 67 assertTrue(a.compareAndSet(obj, 72, 73)); in checkPackageAccess() 173 assertTrue(a.compareAndSet(this, 1, 2)); in testCompareAndSet() 174 assertTrue(a.compareAndSet(this, 2, -4)); in testCompareAndSet() 176 assertFalse(a.compareAndSet(this, -5, 7)); in testCompareAndSet() 178 assertTrue(a.compareAndSet(this, -4, 7)); in testCompareAndSet() 190 assertTrue(a.compareAndSet(this, 1, 2)); in testCompareAndSetProtected() [all …]
|
D | AtomicReferenceFieldUpdaterTest.java | 52 assertTrue(a.compareAndSet(this, one, two)); in checkCompareAndSetProtectedSub() 53 assertTrue(a.compareAndSet(this, two, m4)); in checkCompareAndSetProtectedSub() 55 assertFalse(a.compareAndSet(this, m5, seven)); in checkCompareAndSetProtectedSub() 57 assertTrue(a.compareAndSet(this, m4, seven)); in checkCompareAndSetProtectedSub() 69 assertTrue(a.compareAndSet(obj, one, two)); in checkPackageAccess() 185 assertTrue(a.compareAndSet(this, one, two)); in testCompareAndSet() 186 assertTrue(a.compareAndSet(this, two, m4)); in testCompareAndSet() 188 assertFalse(a.compareAndSet(this, m5, seven)); in testCompareAndSet() 190 assertTrue(a.compareAndSet(this, m4, seven)); in testCompareAndSet() 205 while (!a.compareAndSet(AtomicReferenceFieldUpdaterTest.this, two, three)) in testCompareAndSetInMultipleThreads() [all …]
|
D | AtomicBooleanTest.java | 72 assertTrue(ai.compareAndSet(true, false)); in testCompareAndSet() 74 assertTrue(ai.compareAndSet(false, false)); in testCompareAndSet() 76 assertFalse(ai.compareAndSet(true, false)); in testCompareAndSet() 78 assertTrue(ai.compareAndSet(false, true)); in testCompareAndSet() 90 while (!ai.compareAndSet(false, true)) Thread.yield(); in testCompareAndSetInMultipleThreads() 94 assertTrue(ai.compareAndSet(true, false)); in testCompareAndSetInMultipleThreads()
|
D | AtomicMarkableReferenceTest.java | 85 assertTrue(ai.compareAndSet(one, two, false, false)); in testCompareAndSet() 89 assertTrue(ai.compareAndSet(two, m3, false, true)); in testCompareAndSet() 93 assertFalse(ai.compareAndSet(two, m3, true, true)); in testCompareAndSet() 106 while (!ai.compareAndSet(two, three, false, false)) in testCompareAndSetInMultipleThreads() 111 assertTrue(ai.compareAndSet(one, two, false, false)); in testCompareAndSetInMultipleThreads() 126 while (!ai.compareAndSet(one, one, true, false)) in testCompareAndSetInMultipleThreads2() 131 assertTrue(ai.compareAndSet(one, one, false, true)); in testCompareAndSetInMultipleThreads2()
|
D | AtomicStampedReferenceTest.java | 85 assertTrue(ai.compareAndSet(one, two, 0, 0)); in testCompareAndSet() 89 assertTrue(ai.compareAndSet(two, m3, 0, 1)); in testCompareAndSet() 93 assertFalse(ai.compareAndSet(two, m3, 1, 1)); in testCompareAndSet() 106 while (!ai.compareAndSet(two, three, 0, 0)) in testCompareAndSetInMultipleThreads() 111 assertTrue(ai.compareAndSet(one, two, 0, 0)); in testCompareAndSetInMultipleThreads() 126 while (!ai.compareAndSet(one, one, 1, 2)) in testCompareAndSetInMultipleThreads2() 131 assertTrue(ai.compareAndSet(one, one, 0, 1)); in testCompareAndSetInMultipleThreads2()
|
D | AtomicReferenceTest.java | 72 assertTrue(ai.compareAndSet(one, two)); in testCompareAndSet() 73 assertTrue(ai.compareAndSet(two, m4)); in testCompareAndSet() 75 assertFalse(ai.compareAndSet(m5, seven)); in testCompareAndSet() 77 assertTrue(ai.compareAndSet(m4, seven)); in testCompareAndSet() 89 while (!ai.compareAndSet(two, three)) in testCompareAndSetInMultipleThreads() 94 assertTrue(ai.compareAndSet(one, two)); in testCompareAndSetInMultipleThreads()
|
D | AtomicIntegerTest.java | 76 assertTrue(ai.compareAndSet(1, 2)); in testCompareAndSet() 77 assertTrue(ai.compareAndSet(2, -4)); in testCompareAndSet() 79 assertFalse(ai.compareAndSet(-5, 7)); in testCompareAndSet() 81 assertTrue(ai.compareAndSet(-4, 7)); in testCompareAndSet() 93 while (!ai.compareAndSet(2, 3)) in testCompareAndSetInMultipleThreads() 98 assertTrue(ai.compareAndSet(1, 2)); in testCompareAndSetInMultipleThreads()
|
D | AtomicLongTest.java | 78 assertTrue(ai.compareAndSet(1, 2)); in testCompareAndSet() 79 assertTrue(ai.compareAndSet(2, -4)); in testCompareAndSet() 81 assertFalse(ai.compareAndSet(-5, 7)); in testCompareAndSet() 83 assertTrue(ai.compareAndSet(-4, 7)); in testCompareAndSet() 95 while (!ai.compareAndSet(2, 3)) in testCompareAndSetInMultipleThreads() 100 assertTrue(ai.compareAndSet(1, 2)); in testCompareAndSetInMultipleThreads()
|
D | AtomicReferenceArrayTest.java | 94 aa.compareAndSet(index, null, null); in testIndexing() 141 assertTrue(aa.compareAndSet(i, one, two)); in testCompareAndSet() 142 assertTrue(aa.compareAndSet(i, two, m4)); in testCompareAndSet() 144 assertFalse(aa.compareAndSet(i, m5, seven)); in testCompareAndSet() 146 assertTrue(aa.compareAndSet(i, m4, seven)); in testCompareAndSet() 160 while (!a.compareAndSet(0, two, three)) in testCompareAndSetInMultipleThreads() 165 assertTrue(a.compareAndSet(0, one, two)); in testCompareAndSetInMultipleThreads()
|
/libcore/ojluni/src/test/java/util/concurrent/tck/ |
D | AtomicLongFieldUpdaterTest.java | 73 assertTrue(a.compareAndSet(this, 1, 2)); in checkCompareAndSetProtectedSub() 74 assertTrue(a.compareAndSet(this, 2, -4)); in checkCompareAndSetProtectedSub() 76 assertFalse(a.compareAndSet(this, -5, 7)); in checkCompareAndSetProtectedSub() 78 assertTrue(a.compareAndSet(this, -4, 7)); in checkCompareAndSetProtectedSub() 90 assertTrue(a.compareAndSet(obj, 72L, 73L)); in checkPackageAccess() 196 assertTrue(a.compareAndSet(this, 1, 2)); in testCompareAndSet() 197 assertTrue(a.compareAndSet(this, 2, -4)); in testCompareAndSet() 199 assertFalse(a.compareAndSet(this, -5, 7)); in testCompareAndSet() 201 assertTrue(a.compareAndSet(this, -4, 7)); in testCompareAndSet() 213 assertTrue(a.compareAndSet(this, 1, 2)); in testCompareAndSetProtected() [all …]
|
D | AtomicIntegerFieldUpdaterTest.java | 73 assertTrue(a.compareAndSet(this, 1, 2)); in checkCompareAndSetProtectedSub() 74 assertTrue(a.compareAndSet(this, 2, -4)); in checkCompareAndSetProtectedSub() 76 assertFalse(a.compareAndSet(this, -5, 7)); in checkCompareAndSetProtectedSub() 78 assertTrue(a.compareAndSet(this, -4, 7)); in checkCompareAndSetProtectedSub() 90 assertTrue(a.compareAndSet(obj, 72, 73)); in checkPackageAccess() 196 assertTrue(a.compareAndSet(this, 1, 2)); in testCompareAndSet() 197 assertTrue(a.compareAndSet(this, 2, -4)); in testCompareAndSet() 199 assertFalse(a.compareAndSet(this, -5, 7)); in testCompareAndSet() 201 assertTrue(a.compareAndSet(this, -4, 7)); in testCompareAndSet() 213 assertTrue(a.compareAndSet(this, 1, 2)); in testCompareAndSetProtected() [all …]
|
D | AtomicReferenceFieldUpdaterTest.java | 75 assertTrue(a.compareAndSet(this, one, two)); in checkCompareAndSetProtectedSub() 76 assertTrue(a.compareAndSet(this, two, m4)); in checkCompareAndSetProtectedSub() 78 assertFalse(a.compareAndSet(this, m5, seven)); in checkCompareAndSetProtectedSub() 80 assertTrue(a.compareAndSet(this, m4, seven)); in checkCompareAndSetProtectedSub() 92 assertTrue(a.compareAndSet(obj, one, two)); in checkPackageAccess() 208 assertTrue(a.compareAndSet(this, one, two)); in testCompareAndSet() 209 assertTrue(a.compareAndSet(this, two, m4)); in testCompareAndSet() 211 assertFalse(a.compareAndSet(this, m5, seven)); in testCompareAndSet() 213 assertTrue(a.compareAndSet(this, m4, seven)); in testCompareAndSet() 228 while (!a.compareAndSet(AtomicReferenceFieldUpdaterTest.this, two, three)) in testCompareAndSetInMultipleThreads() [all …]
|
D | AtomicBooleanTest.java | 95 assertTrue(ai.compareAndSet(true, false)); in testCompareAndSet() 97 assertTrue(ai.compareAndSet(false, false)); in testCompareAndSet() 99 assertFalse(ai.compareAndSet(true, false)); in testCompareAndSet() 101 assertTrue(ai.compareAndSet(false, true)); in testCompareAndSet() 113 while (!ai.compareAndSet(false, true)) Thread.yield(); in testCompareAndSetInMultipleThreads() 117 assertTrue(ai.compareAndSet(true, false)); in testCompareAndSetInMultipleThreads()
|
D | AtomicMarkableReferenceTest.java | 108 assertTrue(ai.compareAndSet(one, two, false, false)); in testCompareAndSet() 112 assertTrue(ai.compareAndSet(two, m3, false, true)); in testCompareAndSet() 116 assertFalse(ai.compareAndSet(two, m3, true, true)); in testCompareAndSet() 129 while (!ai.compareAndSet(two, three, false, false)) in testCompareAndSetInMultipleThreads() 134 assertTrue(ai.compareAndSet(one, two, false, false)); in testCompareAndSetInMultipleThreads() 149 while (!ai.compareAndSet(one, one, true, false)) in testCompareAndSetInMultipleThreads2() 154 assertTrue(ai.compareAndSet(one, one, false, true)); in testCompareAndSetInMultipleThreads2()
|
D | AtomicStampedReferenceTest.java | 108 assertTrue(ai.compareAndSet(one, two, 0, 0)); in testCompareAndSet() 112 assertTrue(ai.compareAndSet(two, m3, 0, 1)); in testCompareAndSet() 116 assertFalse(ai.compareAndSet(two, m3, 1, 1)); in testCompareAndSet() 129 while (!ai.compareAndSet(two, three, 0, 0)) in testCompareAndSetInMultipleThreads() 134 assertTrue(ai.compareAndSet(one, two, 0, 0)); in testCompareAndSetInMultipleThreads() 149 while (!ai.compareAndSet(one, one, 1, 2)) in testCompareAndSetInMultipleThreads2() 154 assertTrue(ai.compareAndSet(one, one, 0, 1)); in testCompareAndSetInMultipleThreads2()
|
D | AtomicReferenceTest.java | 95 assertTrue(ai.compareAndSet(one, two)); in testCompareAndSet() 96 assertTrue(ai.compareAndSet(two, m4)); in testCompareAndSet() 98 assertFalse(ai.compareAndSet(m5, seven)); in testCompareAndSet() 100 assertTrue(ai.compareAndSet(m4, seven)); in testCompareAndSet() 112 while (!ai.compareAndSet(two, three)) in testCompareAndSetInMultipleThreads() 117 assertTrue(ai.compareAndSet(one, two)); in testCompareAndSetInMultipleThreads()
|
D | AtomicReferenceArrayTest.java | 117 aa.compareAndSet(index, null, null); in testIndexing() 164 assertTrue(aa.compareAndSet(i, one, two)); in testCompareAndSet() 165 assertTrue(aa.compareAndSet(i, two, m4)); in testCompareAndSet() 167 assertFalse(aa.compareAndSet(i, m5, seven)); in testCompareAndSet() 169 assertTrue(aa.compareAndSet(i, m4, seven)); in testCompareAndSet() 183 while (!a.compareAndSet(0, two, three)) in testCompareAndSetInMultipleThreads() 188 assertTrue(a.compareAndSet(0, one, two)); in testCompareAndSetInMultipleThreads()
|
D | AtomicIntegerTest.java | 99 assertTrue(ai.compareAndSet(1, 2)); in testCompareAndSet() 100 assertTrue(ai.compareAndSet(2, -4)); in testCompareAndSet() 102 assertFalse(ai.compareAndSet(-5, 7)); in testCompareAndSet() 104 assertTrue(ai.compareAndSet(-4, 7)); in testCompareAndSet() 116 while (!ai.compareAndSet(2, 3)) in testCompareAndSetInMultipleThreads() 121 assertTrue(ai.compareAndSet(1, 2)); in testCompareAndSetInMultipleThreads()
|
/libcore/ojluni/src/main/java/java/util/concurrent/atomic/ |
D | AtomicIntegerFieldUpdater.java | 110 public abstract boolean compareAndSet(T obj, int expect, int update); in compareAndSet() method in AtomicIntegerFieldUpdater 173 } while (!compareAndSet(obj, prev, newValue)); in getAndSet() 189 } while (!compareAndSet(obj, prev, next)); in getAndIncrement() 205 } while (!compareAndSet(obj, prev, next)); in getAndDecrement() 222 } while (!compareAndSet(obj, prev, next)); in getAndAdd() 238 } while (!compareAndSet(obj, prev, next)); in incrementAndGet() 254 } while (!compareAndSet(obj, prev, next)); in decrementAndGet() 271 } while (!compareAndSet(obj, prev, next)); in addAndGet() 291 } while (!compareAndSet(obj, prev, next)); in getAndUpdate() 311 } while (!compareAndSet(obj, prev, next)); in updateAndGet() [all …]
|
D | AtomicLongFieldUpdater.java | 113 public abstract boolean compareAndSet(T obj, long expect, long update); in compareAndSet() method in AtomicLongFieldUpdater 176 } while (!compareAndSet(obj, prev, newValue)); in getAndSet() 192 } while (!compareAndSet(obj, prev, next)); in getAndIncrement() 208 } while (!compareAndSet(obj, prev, next)); in getAndDecrement() 225 } while (!compareAndSet(obj, prev, next)); in getAndAdd() 241 } while (!compareAndSet(obj, prev, next)); in incrementAndGet() 257 } while (!compareAndSet(obj, prev, next)); in decrementAndGet() 274 } while (!compareAndSet(obj, prev, next)); in addAndGet() 294 } while (!compareAndSet(obj, prev, next)); in getAndUpdate() 314 } while (!compareAndSet(obj, prev, next)); in updateAndGet() [all …]
|
D | AtomicInteger.java | 133 public final boolean compareAndSet(int expect, int update) { in compareAndSet() method in AtomicInteger 224 } while (!compareAndSet(prev, next)); in getAndUpdate() 243 } while (!compareAndSet(prev, next)); in updateAndGet() 267 } while (!compareAndSet(prev, next)); in getAndAccumulate() 291 } while (!compareAndSet(prev, next)); in accumulateAndGet()
|
D | AtomicReference.java | 117 public final boolean compareAndSet(V expect, V update) { in compareAndSet() method in AtomicReference 163 } while (!compareAndSet(prev, next)); in getAndUpdate() 182 } while (!compareAndSet(prev, next)); in updateAndGet() 206 } while (!compareAndSet(prev, next)); in getAndAccumulate() 230 } while (!compareAndSet(prev, next)); in accumulateAndGet()
|
D | AtomicLong.java | 149 public final boolean compareAndSet(long expect, long update) { in compareAndSet() method in AtomicLong 240 } while (!compareAndSet(prev, next)); in getAndUpdate() 259 } while (!compareAndSet(prev, next)); in updateAndGet() 283 } while (!compareAndSet(prev, next)); in getAndAccumulate() 307 } while (!compareAndSet(prev, next)); in accumulateAndGet()
|
D | AtomicReferenceFieldUpdater.java | 130 public abstract boolean compareAndSet(T obj, V expect, V update); in compareAndSet() method in AtomicReferenceFieldUpdater 191 } while (!compareAndSet(obj, prev, newValue)); in getAndSet() 211 } while (!compareAndSet(obj, prev, next)); in getAndUpdate() 231 } while (!compareAndSet(obj, prev, next)); in updateAndGet() 256 } while (!compareAndSet(obj, prev, next)); in getAndAccumulate() 281 } while (!compareAndSet(obj, prev, next)); in accumulateAndGet() 420 public final boolean compareAndSet(T obj, V expect, V update) { in compareAndSet() method in AtomicReferenceFieldUpdater.AtomicReferenceFieldUpdaterImpl
|