Home
last modified time | relevance | path

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

1234

/external/kotlinx.atomicfu/atomicfu/src/commonTest/kotlin/kotlinx/atomicfu/test/
DTopLevelTest.kt28 check(a.getAndSet(3) == 0) in <lambda>()
32 check(a.getAndSet(2) == 1) in <lambda>()
54 check(b.getAndSet(8924920024888888848) == 8424920024888888848) in <lambda>()
75 check(!c.getAndSet(true)) in <lambda>()
84 check(abcNode.getAndSet(newNode).b.c.d == 8) in <lambda>()
124 check(longArr[3].getAndSet(8924920024888888848) == 8424920024888888848) in testLongArray()
150 check(!booleanArr[2].getAndSet(true)) in testBooleanArray()
DArithmeticTest.kt16 check(a._x.getAndSet(3) == 0) in testInt()
20 check(a._x.getAndSet(2) == 1) in testInt()
43 check(a.z.getAndSet(8924920024888888848) == 8424920024888888848) in testLong()
65 check(a._x.getAndSet(true)) in testBoolean()
/external/kotlinx.atomicfu/atomicfu/src/jvmMain/kotlin/kotlinx/atomicfu/
DAtomicFU.kt100 public actual fun getAndSet(value: T): T { in atomic() method
102 val oldValue = FU.getAndSet(this, value) as T in atomic()
164 public actual fun getAndSet(value: Boolean): Boolean { in getAndSet() method
167 val oldValue = FU.getAndSet(this, v) in getAndSet()
220 public actual fun getAndSet(value: Int): Int { in getAndSet() method
222 val oldValue = FU.getAndSet(this, value) in getAndSet()
349 public actual fun getAndSet(value: Long): Long { in getAndSet() method
351 val oldValue = FU.getAndSet(this, value) in getAndSet()
/external/grpc-grpc-java/grpclb/src/main/java/io/grpc/grpclb/
DGrpclbClientLoadRecorder.java106 .setNumCallsStarted(callsStartedUpdater.getAndSet(this, 0)) in generateLoadReport()
107 .setNumCallsFinished(callsFinishedUpdater.getAndSet(this, 0)) in generateLoadReport()
108 .setNumCallsFinishedWithClientFailedToSend(callsFailedToSendUpdater.getAndSet(this, 0)) in generateLoadReport()
109 .setNumCallsFinishedKnownReceived(callsFinishedKnownReceivedUpdater.getAndSet(this, 0)); in generateLoadReport()
/external/kotlinx.coroutines/kotlinx-coroutines-core/jvm/src/scheduling/
DWorkQueue.kt66 fun poll(): Task? = lastScheduledTask.getAndSet(null) ?: pollBuffer() in poll()
74 val previous = lastScheduledTask.getAndSet(task) ?: return null in poll()
141 lastScheduledTask.getAndSet(null)?.let { globalQueue.addLast(it) } in offloadAllWorkTo()
187 val value = buffer.getAndSet(index, null) ?: continue in pollBuffer()
/external/guava/guava/src/com/google/common/collect/
DAbstractMapBasedMultiset.java104 size -= toRemove.getValue().getAndSet(0); in elementIterator()
149 size -= toRemove.getValue().getAndSet(0); in entryIterator()
307 oldCount = getAndSet(existingCounter, count);
310 oldCount = getAndSet(existingCounter, count);
321 private static int getAndSet(@Nullable Count i, int count) {
326 return i.getAndSet(count);
/external/kotlinx.atomicfu/atomicfu/src/jsMain/kotlin/kotlinx/atomicfu/
DAtomicFU.kt37 public actual fun getAndSet(value: T): T { in atomic() method
64 public actual fun getAndSet(value: Boolean): Boolean { in getAndSet() method
89 public actual fun getAndSet(value: Int): Int { in toString() method
143 public actual fun getAndSet(value: Long): Long { in getAndSet() method
/external/kotlinx.atomicfu/atomicfu/src/nativeMain/kotlin/kotlinx/atomicfu/
DAtomicFU.kt41 public actual fun getAndSet(value: T): T { in atomic() method in kotlinx.atomicfu.AtomicRef
69 public actual fun getAndSet(value: Boolean): Boolean { in getAndSet() method in kotlinx.atomicfu.AtomicBoolean
94 public actual fun getAndSet(value: Int): Int { in toString() method in kotlinx.atomicfu.AtomicInt
128 public actual fun getAndSet(value: Long): Long { in compareAndSet() method in kotlinx.atomicfu.AtomicLong
/external/kotlinx.atomicfu/atomicfu/src/commonMain/kotlin/kotlinx/atomicfu/
DAtomicFU.common.kt85 public fun getAndSet(value: T): T in atomic() method in kotlinx.atomicfu.AtomicRef
157 public fun getAndSet(value: Boolean): Boolean in lazySet() method in kotlinx.atomicfu.AtomicBoolean
229 public fun getAndSet(value: Int): Int in lazySet() method in kotlinx.atomicfu.AtomicInt
340 public fun getAndSet(value: Long): Long in lazySet() method in kotlinx.atomicfu.AtomicLong
/external/jackson-core/src/main/java/com/fasterxml/jackson/core/util/
DBufferRecycler.java128 byte[] buffer = _byteBuffers.getAndSet(ix, null); in allocByteBuffer()
154 char[] buffer = _charBuffers.getAndSet(ix, null); in allocCharBuffer()
/external/grpc-grpc-java/core/src/test/java/io/grpc/internal/
DAutoConfiguredLoadBalancerFactoryTest.java87 calls.getAndSet(1); in forwardsCalls()
92 calls.getAndSet(2); in forwardsCalls()
97 calls.getAndSet(3); in forwardsCalls()
104 assertThat(calls.getAndSet(0)).isEqualTo(1); in forwardsCalls()
107 assertThat(calls.getAndSet(0)).isEqualTo(2); in forwardsCalls()
110 assertThat(calls.getAndSet(0)).isEqualTo(3); in forwardsCalls()
/external/kotlinx.coroutines/kotlinx-coroutines-core/common/src/sync/
DSemaphore.kt228 val cellState = segment.getAndSet(i, PERMIT) // set PERMIT and retrieve the prev cell state in tryResumeNextFromQueue()
280 inline fun getAndSet(index: Int, value: Any?) = acquirers[index].getAndSet(value) in toString() method
/external/guava/android/guava/src/com/google/common/util/concurrent/
DAtomicDouble.java107 public final double getAndSet(double newValue) { in getAndSet() method in AtomicDouble
109 return longBitsToDouble(value.getAndSet(next)); in getAndSet()
DAtomicDoubleArray.java127 public final double getAndSet(int i, double newValue) { in getAndSet() method in AtomicDoubleArray
129 return longBitsToDouble(longs.getAndSet(i, next)); in getAndSet()
/external/kotlinx.coroutines/kotlinx-coroutines-core/jvm/test/
DEventLoopsTest.kt142 check(waitingThread.getAndSet(Thread.currentThread()) == null) in blockingAwait()
143 while (!fired.getAndSet(false)) { in blockingAwait()
/external/guice/core/test/com/google/inject/
DTypeListenerTest.java388 assertEquals(0, injections.getAndSet(0));
392 assertEquals(1, injections.getAndSet(0));
396 assertEquals(1, injections.getAndSet(0));
401 assertEquals(0, injections.getAndSet(0));
406 assertEquals(2, injections.getAndSet(0));
411 assertEquals(2, injections.getAndSet(0));
414 assertEquals(1, typeEncounters.getAndSet(0));
/external/guava/guava/src/com/google/common/util/concurrent/
DAtomicDouble.java113 public final double getAndSet(double newValue) { in getAndSet() method in AtomicDouble
115 return longBitsToDouble(updater.getAndSet(this, next)); in getAndSet()
DAtomicDoubleArray.java127 public final double getAndSet(int i, double newValue) { in getAndSet() method in AtomicDoubleArray
129 return longBitsToDouble(longs.getAndSet(i, next)); in getAndSet()
/external/dagger2/java/dagger/hilt/android/internal/testing/
DTestApplicationComponentManager.java211 switch (delayedComponentState.getAndSet(DelayedComponentState.COMPONENT_DELAYED)) { in delayComponentReady()
225 switch (delayedComponentState.getAndSet(DelayedComponentState.COMPONENT_READY)) { in componentReady()
241 switch (delayedComponentState.getAndSet(DelayedComponentState.INJECTED)) { in inject()
/external/exoplayer/tree/testutils/src/main/java/com/google/android/exoplayer2/testutil/
DMediaSourceTestRunner.java273 assertThat(lastCreatedMediaPeriod.getAndSet(/* newValue= */ null)).isEqualTo(mediaPeriodId); in assertPrepareAndReleasePeriod()
285 assertThat(lastCreatedMediaPeriod.getAndSet(/* newValue= */ null)) in assertPrepareAndReleasePeriod()
291 assertThat(lastReleasedMediaPeriod.getAndSet(/* newValue= */ null)).isEqualTo(mediaPeriodId); in assertPrepareAndReleasePeriod()
293 assertThat(lastReleasedMediaPeriod.getAndSet(/* newValue= */ null)) in assertPrepareAndReleasePeriod()
/external/kotlinx.atomicfu/atomicfu-gradle-plugin/src/test/resources/projects/js-simple/src/main/kotlin/
DIntArithmetic.kt13 a._x.getAndSet(3) in doWork()
/external/kotlinx.atomicfu/atomicfu-gradle-plugin/src/test/resources/projects/jvm-simple/src/main/kotlin/
DIntArithmetic.kt13 a._x.getAndSet(3) in doWork()
/external/kotlinx.atomicfu/atomicfu-gradle-plugin/src/test/resources/projects/mpp-simple/src/commonMain/kotlin/
DIntArithmetic.kt13 a._x.getAndSet(3) in doWork()
/external/testng/src/test/java/test/retryAnalyzer/
DEventualSuccess.java13 if (!ranYet.getAndSet(true)) { in test()
/external/guice/core/test/com/google/inject/util/
DOverrideModuleTest.java545 assertEquals('A', charAProvider.getAndSet(null).get().charValue()); in testOverrideDeepExpose()
549 assertEquals('A', charAProvider.getAndSet(null).get().charValue()); in testOverrideDeepExpose()
573 assertEquals('A', charAProvider.getAndSet(null).get().charValue()); in testOverrideDeepExpose()
574 assertEquals('B', charBProvider.getAndSet(null).get().charValue()); in testOverrideDeepExpose()
578 assertEquals('A', charAProvider.getAndSet(null).get().charValue()); in testOverrideDeepExpose()
579 assertEquals('B', charBProvider.getAndSet(null).get().charValue()); in testOverrideDeepExpose()

1234