/libcore/jsr166-tests/src/test/java/jsr166/ |
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 | 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 | 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 | 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 | 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 | 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 | 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 | 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 | 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 | 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 | 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 | 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 | AtomicLongTest.java | 101 assertTrue(ai.compareAndSet(1, 2)); in testCompareAndSet() 102 assertTrue(ai.compareAndSet(2, -4)); in testCompareAndSet() 104 assertFalse(ai.compareAndSet(-5, 7)); in testCompareAndSet() 106 assertTrue(ai.compareAndSet(-4, 7)); in testCompareAndSet() 118 while (!ai.compareAndSet(2, 3)) in testCompareAndSetInMultipleThreads() 123 assertTrue(ai.compareAndSet(1, 2)); 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 | 114 public abstract boolean compareAndSet(T obj, int expect, int update); in compareAndSet() method in AtomicIntegerFieldUpdater 175 } while (!compareAndSet(obj, prev, newValue)); in getAndSet() 191 } while (!compareAndSet(obj, prev, next)); in getAndIncrement() 207 } while (!compareAndSet(obj, prev, next)); in getAndDecrement() 224 } while (!compareAndSet(obj, prev, next)); in getAndAdd() 240 } while (!compareAndSet(obj, prev, next)); in incrementAndGet() 256 } while (!compareAndSet(obj, prev, next)); in decrementAndGet() 273 } while (!compareAndSet(obj, prev, next)); in addAndGet() 295 } while (!compareAndSet(obj, prev, next)); in getAndUpdate() 317 } while (!compareAndSet(obj, prev, next)); in updateAndGet() [all …]
|
D | AtomicLongFieldUpdater.java | 117 public abstract boolean compareAndSet(T obj, long expect, long update); in compareAndSet() method in AtomicLongFieldUpdater 178 } while (!compareAndSet(obj, prev, newValue)); in getAndSet() 194 } while (!compareAndSet(obj, prev, next)); in getAndIncrement() 210 } while (!compareAndSet(obj, prev, next)); in getAndDecrement() 227 } while (!compareAndSet(obj, prev, next)); in getAndAdd() 243 } while (!compareAndSet(obj, prev, next)); in incrementAndGet() 259 } while (!compareAndSet(obj, prev, next)); in decrementAndGet() 276 } while (!compareAndSet(obj, prev, next)); in addAndGet() 298 } while (!compareAndSet(obj, prev, next)); in getAndUpdate() 320 } while (!compareAndSet(obj, prev, next)); in updateAndGet() [all …]
|
D | AtomicReferenceFieldUpdater.java | 136 public abstract boolean compareAndSet(T obj, V expect, V update); in compareAndSet() method in AtomicReferenceFieldUpdater 197 } while (!compareAndSet(obj, prev, newValue)); in getAndSet() 219 } while (!compareAndSet(obj, prev, next)); in getAndUpdate() 241 } while (!compareAndSet(obj, prev, next)); in updateAndGet() 267 } while (!compareAndSet(obj, prev, next)); in getAndAccumulate() 293 } while (!compareAndSet(obj, prev, next)); in accumulateAndGet() 452 public final boolean compareAndSet(T obj, V expect, V update) { in compareAndSet() method in AtomicReferenceFieldUpdater.AtomicReferenceFieldUpdaterImpl
|
/libcore/ojluni/src/main/java/java/util/concurrent/ |
D | Exchanger.java | 364 if (q != null && AA.compareAndSet(a, j, q, null)) { in arenaExchange() 374 if (AA.compareAndSet(a, j, null, p)) { in arenaExchange() 408 AA.compareAndSet(a, j, p, null)) { in arenaExchange() 410 BOUND.compareAndSet(this, b, b + SEQ - 1); in arenaExchange() 432 !BOUND.compareAndSet(this, b, b + SEQ + 1)) { in arenaExchange() 461 if (SLOT.compareAndSet(this, q, null)) { in slotExchange() 471 BOUND.compareAndSet(this, 0, SEQ)) in slotExchange() 478 if (SLOT.compareAndSet(this, null, p)) in slotExchange() 510 else if (SLOT.compareAndSet(this, p, null)) { in slotExchange()
|
D | Phaser.java | 390 if (STATE.compareAndSet(this, s, s-=adjust)) { in doArrive() 403 STATE.compareAndSet(this, s, n); in doArrive() 408 STATE.compareAndSet(this, s, s | EMPTY); in doArrive() 443 else if (STATE.compareAndSet(this, s, s + adjust)) in doRegister() 449 if (STATE.compareAndSet(this, s, next)) in doRegister() 683 if (STATE.compareAndSet(this, s, s -= ONE_ARRIVAL)) { in arriveAndAwaitAdvance() 698 if (!STATE.compareAndSet(this, s, n)) in arriveAndAwaitAdvance() 814 if (STATE.compareAndSet(root, s, s | TERMINATION_BIT)) { in forceTermination() 973 if (head.compareAndSet(q, q.next) && in releaseWaiters() 998 if (head.compareAndSet(q, q.next) && t != null) { in abortWait() [all …]
|