Home
last modified time | relevance | path

Searched refs:getAndSet (Results 1 – 25 of 43) sorted by relevance

12

/libcore/jsr166-tests/src/test/java/jsr166/
DAtomicBooleanTest.java118 assertEquals(true, ai.getAndSet(false)); in testGetAndSet()
119 assertEquals(false, ai.getAndSet(false)); in testGetAndSet()
120 assertEquals(false, ai.getAndSet(true)); in testGetAndSet()
DAtomicReferenceTest.java118 assertSame(one, ai.getAndSet(zero)); in testGetAndSet()
119 assertSame(zero, ai.getAndSet(m10)); in testGetAndSet()
120 assertSame(m10, ai.getAndSet(one)); in testGetAndSet()
DAtomicIntegerTest.java122 assertEquals(1, ai.getAndSet(0)); in testGetAndSet()
123 assertEquals(0, ai.getAndSet(-10)); in testGetAndSet()
124 assertEquals(-10, ai.getAndSet(1)); in testGetAndSet()
DAtomicLongTest.java124 assertEquals(1, ai.getAndSet(0)); in testGetAndSet()
125 assertEquals(0, ai.getAndSet(-10)); in testGetAndSet()
126 assertEquals(-10, ai.getAndSet(1)); in testGetAndSet()
DAtomicReferenceFieldUpdaterTest.java238 assertSame(one, a.getAndSet(this, zero)); in testGetAndSet()
239 assertSame(zero, a.getAndSet(this, m10)); in testGetAndSet()
240 assertSame(m10, a.getAndSet(this, 1)); in testGetAndSet()
DAtomicLongFieldUpdaterTest.java253 assertEquals(1, a.getAndSet(this, 0)); in testGetAndSet()
254 assertEquals(0, a.getAndSet(this, -10)); in testGetAndSet()
255 assertEquals(-10, a.getAndSet(this, 1)); in testGetAndSet()
DAtomicIntegerFieldUpdaterTest.java253 assertEquals(1, a.getAndSet(this, 0)); in testGetAndSet()
254 assertEquals(0, a.getAndSet(this, -10)); in testGetAndSet()
255 assertEquals(-10, a.getAndSet(this, 1)); in testGetAndSet()
DAtomicReferenceArrayTest.java194 assertSame(one, aa.getAndSet(i, zero)); in testGetAndSet()
195 assertSame(zero, aa.getAndSet(i, m10)); in testGetAndSet()
196 assertSame(m10, aa.getAndSet(i, one)); in testGetAndSet()
DAtomicIntegerArrayTest.java187 assertEquals(1, aa.getAndSet(i, 0)); in testGetAndSet()
188 assertEquals(0, aa.getAndSet(i, -10)); in testGetAndSet()
189 assertEquals(-10, aa.getAndSet(i, 1)); in testGetAndSet()
DAtomicLongArrayTest.java186 assertEquals(1, aa.getAndSet(i, 0)); in testGetAndSet()
187 assertEquals(0, aa.getAndSet(i, -10)); in testGetAndSet()
188 assertEquals(-10, aa.getAndSet(i, 1)); in testGetAndSet()
/libcore/ojluni/src/test/java/util/concurrent/tck/
DAtomicReferenceTest.java141 assertSame(one, ai.getAndSet(zero)); in testGetAndSet()
142 assertSame(zero, ai.getAndSet(m10)); in testGetAndSet()
143 assertSame(m10, ai.getAndSet(one)); in testGetAndSet()
DAtomicIntegerTest.java145 assertEquals(1, ai.getAndSet(0)); in testGetAndSet()
146 assertEquals(0, ai.getAndSet(-10)); in testGetAndSet()
147 assertEquals(-10, ai.getAndSet(1)); in testGetAndSet()
DAtomicLongTest.java147 assertEquals(1, ai.getAndSet(0)); in testGetAndSet()
148 assertEquals(0, ai.getAndSet(-10)); in testGetAndSet()
149 assertEquals(-10, ai.getAndSet(1)); in testGetAndSet()
DAtomicReferenceFieldUpdaterTest.java261 assertSame(one, a.getAndSet(this, zero)); in testGetAndSet()
262 assertSame(zero, a.getAndSet(this, m10)); in testGetAndSet()
263 assertSame(m10, a.getAndSet(this, 1)); in testGetAndSet()
DAtomicLongFieldUpdaterTest.java276 assertEquals(1, a.getAndSet(this, 0)); in testGetAndSet()
277 assertEquals(0, a.getAndSet(this, -10)); in testGetAndSet()
278 assertEquals(-10, a.getAndSet(this, 1)); in testGetAndSet()
DAtomicIntegerFieldUpdaterTest.java276 assertEquals(1, a.getAndSet(this, 0)); in testGetAndSet()
277 assertEquals(0, a.getAndSet(this, -10)); in testGetAndSet()
278 assertEquals(-10, a.getAndSet(this, 1)); in testGetAndSet()
DAtomicReferenceArrayTest.java217 assertSame(one, aa.getAndSet(i, zero)); in testGetAndSet()
218 assertSame(zero, aa.getAndSet(i, m10)); in testGetAndSet()
219 assertSame(m10, aa.getAndSet(i, one)); in testGetAndSet()
DAtomicIntegerArrayTest.java210 assertEquals(1, aa.getAndSet(i, 0)); in testGetAndSet()
211 assertEquals(0, aa.getAndSet(i, -10)); in testGetAndSet()
212 assertEquals(-10, aa.getAndSet(i, 1)); in testGetAndSet()
DAtomicLongArrayTest.java209 assertEquals(1, aa.getAndSet(i, 0)); in testGetAndSet()
210 assertEquals(0, aa.getAndSet(i, -10)); in testGetAndSet()
211 assertEquals(-10, aa.getAndSet(i, 1)); in testGetAndSet()
/libcore/ojluni/src/main/java/java/nio/channels/
DSelectionKey.java388 return attachmentUpdater.getAndSet(this, ob); in attach()
/libcore/ojluni/src/main/java/java/util/concurrent/atomic/
DAtomicBoolean.java148 public final boolean getAndSet(boolean newValue) { in getAndSet() method in AtomicBoolean
DAtomicReferenceFieldUpdater.java187 public V getAndSet(T obj, V newValue) { in getAndSet() method in AtomicReferenceFieldUpdater
452 public final V getAndSet(T obj, V newValue) { in getAndSet() method in AtomicReferenceFieldUpdater.AtomicReferenceFieldUpdaterImpl
/libcore/ojluni/src/main/java/sun/nio/ch/
DAsynchronousChannelGroupImpl.java260 if (shutdown.getAndSet(true)) {
298 if (shutdown.getAndSet(true))
/libcore/ojluni/annotations/hiddenapi/java/util/concurrent/atomic/
DAtomicInteger.java63 public final int getAndSet(int newValue) { in getAndSet() method in AtomicInteger
/libcore/ojluni/src/main/java/java/nio/channels/spi/
DAbstractSelector.java108 boolean open = selectorOpen.getAndSet(false); in close()

12