187 references to CompareExchange
mscorlib (30)
system\Collections\Concurrent\ConcurrentQueue.cs (1)
831if (Interlocked.CompareExchange(ref m_low, lowLocal + 1, lowLocal) == lowLocal)
system\diagnostics\eventing\activitytracker.cs (1)
202if (Interlocked.CompareExchange(ref activityToStop.m_stopped, 1, 0) == 0)
system\diagnostics\eventing\eventsource.cs (1)
5442while (Interlocked.CompareExchange(ref af.m_curSampleCount, newSampleCount, curSampleCount) != curSampleCount);
System\Diagnostics\Eventing\TraceLogging\NameInfo.cs (1)
29if (Interlocked.CompareExchange(ref lastIdentity, newIdentity, snapshot) == snapshot)
system\io\filestream.cs (2)
2137if (1 == Interlocked.CompareExchange(ref afsar._EndXxxCalled, 1, 0)) 2392if (1 == Interlocked.CompareExchange(ref afsar._EndXxxCalled, 1, 0))
system\runtime\interopservices\windowsruntime\windowsruntimemarshal.cs (2)
1000if (Interlocked.CompareExchange(ref myLock, 1, 0) != 0) 1013if (Interlocked.CompareExchange(ref myLock, 1, 0) == 0)
system\runtime\remoting\identity.cs (3)
256if(currentFlags == Interlocked.CompareExchange(ref _flags, newFlags, currentFlags)) 268if(currentFlags == Interlocked.CompareExchange(ref _flags, newFlags, currentFlags)) 299if(currentFlags == Interlocked.CompareExchange(ref _flags, newFlags, currentFlags))
system\runtime\remoting\serveridentity.cs (1)
260if (_tpOrObject != null && _firstCallDispatched == 0 && Interlocked.CompareExchange(ref _firstCallDispatched, 1, 0) == 0)
system\threading\CancellationTokenSource.cs (1)
723if (Interlocked.CompareExchange(ref m_state, NOTIFYING, NOT_CANCELED) == NOT_CANCELED)
system\threading\CountdownEvent.cs (2)
256if (Interlocked.CompareExchange(ref m_currentCount, observedCount - signalCount, observedCount) == observedCount) 370if (Interlocked.CompareExchange(ref m_currentCount, observedCount + signalCount, observedCount) == observedCount)
system\threading\ManualResetEventSlim.cs (1)
782if (Interlocked.CompareExchange(ref m_combinedState, newState, oldState) == oldState)
system\threading\SpinLock.cs (1)
500if (Interlocked.CompareExchange(ref m_owner, observedOwner - 2, observedOwner) == observedOwner)
system\threading\Tasks\ParallelLoopState.cs (2)
223while (Interlocked.CompareExchange( 442if (Interlocked.CompareExchange(ref m_LoopStateFlags, oldState | newState, oldState) == oldState)
system\threading\Tasks\Task.cs (4)
820if (Interlocked.CompareExchange(ref m_stateFlags, oldFlags | newBits, oldFlags) == oldFlags) 835if (Interlocked.CompareExchange(ref m_stateFlags, oldFlags | newBits, oldFlags) == oldFlags) 871if (Interlocked.CompareExchange(ref m_stateFlags, newFlags, oldFlags) == oldFlags) break; 1332Interlocked.CompareExchange(ref m_taskId, newId, 0);
system\threading\Tasks\TaskFactory.cs (1)
2436if (Interlocked.CompareExchange(ref m_firstTaskAlreadyCompleted, 1, 0) == 0)
system\threading\Tasks\TaskScheduler.cs (1)
416Interlocked.CompareExchange(ref m_taskSchedulerId, newId, 0);
system\threading\threadpool.cs (5)
462int prevIndexes = Interlocked.CompareExchange(ref indexes, newIndexes, oldIndexes); 583int prev = Interlocked.CompareExchange(ref numOutstandingThreadRequests, count+1, count); 605int prev = Interlocked.CompareExchange(ref numOutstandingThreadRequests, count - 1, count); 1005if (Interlocked.CompareExchange(ref m_lock, 1, 0) == 0) 1074if (Interlocked.CompareExchange(ref m_lock, 1, 0) == 0)
PresentationFramework (6)
src\Framework\MS\Internal\PtsHost\FlowDocumentPage.cs (1)
830if (Interlocked.CompareExchange(ref _disposed, 1, 0) == 0)
src\Framework\MS\Internal\PtsHost\PageBreakRecord.cs (1)
144if (Interlocked.CompareExchange(ref _disposed, 1, 0) == 0)
src\Framework\MS\Internal\PtsHost\PtsCache.cs (2)
187if (0 == Interlocked.CompareExchange(ref _disposed, 1, 0)) 340if (0 == Interlocked.CompareExchange(ref _disposed, 1, 0))
src\Framework\MS\Internal\PtsHost\PtsContext.cs (1)
93if (Interlocked.CompareExchange(ref _disposed, 1, 0) == 0)
src\Framework\MS\Internal\PtsHost\PtsPage.cs (1)
781if (Interlocked.CompareExchange(ref _disposed, 1, 0) == 0)
SMSvcHost (1)
System\ServiceModel\Activation\ListenerAdapter.cs (1)
783int currentClosingProcessStatus = Interlocked.CompareExchange(ref closingProcessStatus,
System (54)
compmod\microsoft\win32\SafeNativeMethods.cs (1)
176return Interlocked.CompareExchange(ref *(int *)pDestination.ToPointer(), exchange, compare);
net\System\Net\_ConnectStream.cs (11)
621Interlocked.CompareExchange(ref m_CallNesting, Nesting.InternalIO, Nesting.Idle); 693Interlocked.CompareExchange(ref m_CallNesting, Nesting.Idle, Nesting.InternalIO); 921int nesting = Interlocked.CompareExchange(ref m_CallNesting, Nesting.IoInProgress, Nesting.Idle); 1161nesting = Interlocked.CompareExchange(ref m_CallNesting, (nesting == Nesting.InError? Nesting.InError: Nesting.Idle), Nesting.IoInProgress); 1276int result = Interlocked.CompareExchange(ref m_CallNesting, value, comparand); 1408int nesting = Interlocked.CompareExchange(ref m_CallNesting, Nesting.IoInProgress, Nesting.Idle); 1437Interlocked.CompareExchange(ref m_CallNesting, Nesting.Idle, Nesting.IoInProgress); 1679int nesting = Interlocked.CompareExchange(ref m_CallNesting, Nesting.IoInProgress, Nesting.Idle); 1997Interlocked.CompareExchange(ref m_CallNesting, Nesting.Idle, Nesting.IoInProgress); 2181Interlocked.CompareExchange(ref m_CallNesting, Nesting.InternalIO, Nesting.Idle); 2229Interlocked.CompareExchange(ref m_CallNesting, Nesting.Idle, Nesting.InternalIO);
net\System\Net\_LazyAsyncResult.cs (3)
164Interlocked.CompareExchange(ref m_IntCompleted, c_HighBit, 0); 246result = Interlocked.CompareExchange(ref m_IntCompleted, c_HighBit, 0); 271result = Interlocked.CompareExchange(ref m_IntCompleted, c_HighBit, 0);
net\System\Net\_PooledStream.cs (2)
557if (oldValue == Interlocked.CompareExchange(ref location1, oldValue | bitMask, oldValue)) { 574if (ClosingFlag == Interlocked.CompareExchange(ref m_SynchronousIOClosingState, ClosedFlag, ClosingFlag)) {
net\System\Net\_TimerThread.cs (4)
618TimerThreadState oldState = (TimerThreadState) Interlocked.CompareExchange( 649if (Interlocked.CompareExchange(ref s_ThreadState, (int) TimerThreadState.Running, (int) TimerThreadState.Running) != 717Interlocked.CompareExchange(ref s_ThreadState, (int) TimerThreadState.Idle, (int) TimerThreadState.Running); 720if (Interlocked.CompareExchange(ref s_ThreadState, (int) TimerThreadState.Running, (int) TimerThreadState.Idle) ==
net\System\Net\HttpListener.cs (2)
2728while ((oldValue = Interlocked.CompareExchange(ref m_OwnershipState, 1, 0)) == 2) 2741if (Interlocked.CompareExchange(ref m_OwnershipState, 0, 1) == 2)
net\System\Net\HttpWebRequest.cs (1)
3140if(Interlocked.CompareExchange(ref m_Aborted, abortState, 0) == 0) // public abort will never drain streams
net\System\Net\Internal.cs (6)
466int gate = Interlocked.CompareExchange(ref m_State, Triggered, Open); 483int gate = Interlocked.CompareExchange(ref m_State, Triggering, Open); 495int gate = Interlocked.CompareExchange(ref m_State, Triggered, Triggering); 511int gate = Interlocked.CompareExchange(ref m_State, Signaling, Triggered); 524int gate = Interlocked.CompareExchange(ref m_State, Signaled, Signaling); 535int gate = Interlocked.CompareExchange(ref m_State, Completed, Signaled);
net\System\Net\NetworkInformation\ping.cs (2)
86int currentStatus = Interlocked.CompareExchange(ref status, InProgress, Free); 135if (Interlocked.CompareExchange(ref status, Disposed, Free) != Free)
net\System\Net\SecureProtocols\_SslState.cs (5)
1187int lockState = Interlocked.CompareExchange(ref _LockReadState, LockRead, LockNone); 1235int lockState = Interlocked.CompareExchange(ref _LockReadState, LockNone, LockRead); 1267int lockState = Interlocked.CompareExchange(ref _LockWriteState, LockWrite, LockNone); 1302int lockState = Interlocked.CompareExchange(ref _LockWriteState, LockNone, LockWrite); 1394int lockState = Interlocked.CompareExchange(ref _LockWriteState, LockNone, LockHandshake);
net\System\Net\Sockets\Socket.cs (5)
6253while ((last = Interlocked.CompareExchange(ref m_IntCleanedUp, 1, 0)) == 2) 7532if (Interlocked.CompareExchange(ref m_IntCleanedUp, 2, 0) != 0) 8966if(Interlocked.CompareExchange(ref m_Operating, Disposed, Free) != Free) { 8986int status = Interlocked.CompareExchange(ref m_Operating, Configuring, Free); 9001if(Interlocked.CompareExchange(ref m_Operating, InProgress, Free) != Free) {
net\System\Net\WebSockets\ClientWebSocket.cs (2)
136int priorState = Interlocked.CompareExchange(ref state, connecting, created); 176if (Interlocked.CompareExchange(ref state, connected, connecting) != connecting)
net\System\Net\WebSockets\WebSocketBase.cs (1)
1913int originalReceiveState = Interlocked.CompareExchange(ref m_WebSocket.m_ReceiveState,
net\System\Net\WebSockets\WebSocketBuffer.cs (1)
122if (Interlocked.CompareExchange(ref m_StateWhenDisposing, (int)webSocketState, int.MinValue) != int.MinValue)
net\System\Net\WebSockets\WebSocketHttpListenerDuplexStream.cs (2)
1003if (Interlocked.CompareExchange(ref m_Operating, Disposed, Free) != Free) 1062if (Interlocked.CompareExchange(ref m_Operating, InProgress, Free) != Free)
services\monitoring\system\diagnosticts\SharedPerformanceCounter.cs (1)
516int r = Interlocked.CompareExchange(ref *spinLockPointer, 1, 0);
sys\system\collections\concurrent\BlockingCollection.cs (2)
476if (Interlocked.CompareExchange(ref m_currentAdders, observedAdders + 1, observedAdders) == observedAdders) 1509if (Interlocked.CompareExchange(ref m_currentAdders, observedAdders | COMPLETE_ADDING_ON_MASK, observedAdders) == observedAdders)
sys\system\io\ports\SerialStream.cs (2)
962if (1 == Interlocked.CompareExchange(ref afsar._EndXxxCalled, 1, 0)) 1033if (1 == Interlocked.CompareExchange(ref afsar._EndXxxCalled, 1, 0))
sys\system\threading\Barrier.cs (1)
289return Interlocked.CompareExchange(ref m_currentTotalCount, newCurrentTotal, currentTotal) == currentTotal;
System.Activities (4)
System\Activities\Activity.cs (1)
898Interlocked.CompareExchange(ref nextCacheId, 1, int.MaxValue);
System\Activities\Hosting\WorkflowInstance.cs (1)
585wasPerformingOperation = Interlocked.CompareExchange(ref this.isPerformingOperation, True, False) == True;
System\Activities\WorkflowApplicationInstance.cs (2)
121int oldState = Interlocked.CompareExchange(ref this.state, (int)State.Loaded, (int)State.Initialized); 127int oldState = Interlocked.CompareExchange(ref this.state, (int)State.Aborted, (int)State.Initialized);
System.Configuration (1)
System\Configuration\SafeBitVector32.cs (1)
46int result = Interlocked.CompareExchange(ref _data, newData, oldData);
System.Core (4)
System\IO\Pipes\Pipe.cs (1)
731if (1 == Interlocked.CompareExchange(ref afsar._EndXxxCalled, 1, 0)) {
System\IO\Pipes\PipeStream.cs (2)
380if (1 == Interlocked.CompareExchange(ref afsar._EndXxxCalled, 1, 0)) { 582if (1 == Interlocked.CompareExchange(ref afsar._EndXxxCalled, 1, 0)) {
system\threading\ReaderWriterLockSlim\ReaderWriterLockSlim.cs (1)
1637return Interlocked.CompareExchange(ref _isLocked, 1, 0) == 0;
System.Data (3)
fx\src\data\System\Data\ProviderBase\DbConnectionPool.cs (1)
1083started = Interlocked.CompareExchange(ref _pendingOpensWaiting, 1, 0) == 0;
fx\src\data\System\Data\ProviderBase\DbConnectionPoolAuthenticationContext.cs (2)
95int oldValue = Interlocked.CompareExchange(ref _isUpdateInProgress, STATUS_LOCKED, STATUS_UNLOCKED); 104int oldValue = Interlocked.CompareExchange(ref _isUpdateInProgress, STATUS_UNLOCKED, STATUS_LOCKED);
System.Data.Services.Client (2)
System\Data\Services\Client\BaseAsyncResult.cs (1)
399System.Threading.Interlocked.CompareExchange(ref this.completed, 1, 0);
System\Data\Services\Client\DataServiceContext.cs (1)
6199System.Threading.Interlocked.CompareExchange(ref this.requestStatus, 1, 0);
System.Drawing (3)
commonui\System\Drawing\BufferedGraphicsContext.cs (3)
146int oldBusy = Interlocked.CompareExchange(ref busy, BUFFER_BUSY_PAINTING, BUFFER_FREE); 564int oldBusy = Interlocked.CompareExchange(ref busy, BUFFER_BUSY_DISPOSING, BUFFER_FREE); 628int oldBusy = Interlocked.CompareExchange(ref busy, BUFFER_BUSY_DISPOSING, BUFFER_FREE);
System.Net (2)
net\PeerToPeer\Collaboration\Peer.cs (1)
903Interlocked.CompareExchange(ref s_TraceEventId, 0, int.MaxValue);
net\PeerToPeer\PeerNameResolver.cs (1)
912Interlocked.CompareExchange(ref s_TraceEventId, 0, int.MaxValue);
System.Runtime.Caching (3)
System\Caching\MemoryCacheEntry.cs (1)
174return (Interlocked.CompareExchange(ref _state, (int)value, (int)comparand) == (int)comparand);
System\Caching\SafeBitVector32.cs (2)
32int result = Interlocked.CompareExchange(ref _data, newData, oldData); 58int result = Interlocked.CompareExchange(ref _data, newData, oldData);
System.Runtime.DurableInstancing (2)
System\Runtime\DurableInstancing\InstancePersistenceContext.cs (2)
125if (Interlocked.CompareExchange(ref this.cancellationHandlerCalled, 0, 1) == 0) 789if (Interlocked.CompareExchange(ref this.cancellationHandlerCalled, 0, 1) == 0)
System.Runtime.Serialization (3)
System\Xml\XmlStreamNodeWriter.cs (3)
167if (Interlocked.CompareExchange(ref this.hasPendingWrite, 1, 0) != 0) 189if (Interlocked.CompareExchange(ref this.hasPendingWrite, 0, 1) != 1) 210if (Interlocked.CompareExchange(ref thisPtr.hasPendingWrite, 0, 1) != 1)
System.ServiceModel (14)
System\ServiceModel\Channels\HttpChannelFactory.cs (2)
1375if (Interlocked.CompareExchange(ref this.webRequestCompleted, 1, 0) == 0) 1913if (Interlocked.CompareExchange(ref this.webRequestCompleted, 1, 0) == 0)
System\ServiceModel\Channels\WebSocketTransportDuplexSessionChannel.cs (7)
378if (Interlocked.CompareExchange(ref this.cleanupStatus, WebSocketHelper.OperationFinished, WebSocketHelper.OperationNotStarted) == WebSocketHelper.OperationNotStarted) 563if (Interlocked.CompareExchange(ref this.asyncReceiveState, AsyncReceiveState.Cancelled, AsyncReceiveState.Started) == AsyncReceiveState.Started) 836int currentState = Interlocked.CompareExchange(ref this.asyncReceiveState, AsyncReceiveState.Started, AsyncReceiveState.Finished); 921if (Interlocked.CompareExchange(ref this.asyncReceiveState, AsyncReceiveState.Finished, AsyncReceiveState.Started) == AsyncReceiveState.Started) 1379if (Interlocked.CompareExchange(ref this.endOfMessageWritten, WebSocketHelper.OperationFinished, WebSocketHelper.OperationNotStarted) == WebSocketHelper.OperationNotStarted) 1457if (Interlocked.CompareExchange(ref this.messageSourceCleanState, WebSocketHelper.OperationFinished, WebSocketHelper.OperationNotStarted) == WebSocketHelper.OperationNotStarted) 1495if (Interlocked.CompareExchange(ref this.endOfMessageWritten, WebSocketHelper.OperationFinished, WebSocketHelper.OperationNotStarted) == WebSocketHelper.OperationNotStarted)
System\ServiceModel\Dispatcher\BufferedReceiveBinder.cs (2)
74if (Interlocked.CompareExchange(ref this.pendingOperationSemaphore, 1, 0) == 0) 96if (Interlocked.CompareExchange(ref this.pendingOperationSemaphore, 1, 0) == 0)
System\ServiceModel\Dispatcher\ChannelHandler.cs (1)
2005return Interlocked.CompareExchange(ref this.isPumpAcquired, 1, 0) == 0;
System\ServiceModel\Dispatcher\MultipleReceiveBinder.cs (1)
378if (slot == (slot = Interlocked.CompareExchange(ref this.pending, (slot + 1) % this.size, slot)))
System\ServiceModel\Dispatcher\QueryNode.cs (1)
1206if (Interlocked.CompareExchange(ref this.disposed, 1, 0) == 0)
System.ServiceModel.Activation (6)
System\ServiceModel\Activation\HostedHttpRequestAsyncResult.cs (6)
618Interlocked.CompareExchange(ref this.state, State.Completed, State.Running) == State.Running) 627Interlocked.CompareExchange(ref this.state, State.Aborted, State.Running) == State.Running) 647if (Interlocked.CompareExchange(ref this.streamedReadState, StreamedReadState.Aborted, StreamedReadState.AbortStarted) == StreamedReadState.AbortStarted) 666return Interlocked.CompareExchange(ref this.streamedReadState, StreamedReadState.ReceiveStarted, StreamedReadState.None) == StreamedReadState.None; 671if (Interlocked.CompareExchange(ref this.streamedReadState, StreamedReadState.None, StreamedReadState.ReceiveStarted) == StreamedReadState.ReceiveStarted) 676if (Interlocked.CompareExchange(ref this.streamedReadState, StreamedReadState.ReceiveFinishedAfterAbortStarted, StreamedReadState.AbortStarted) == StreamedReadState.AbortStarted)
System.ServiceModel.Activities (1)
System\ServiceModel\Activities\Dispatcher\BufferedReceiveManager.cs (1)
326if (Interlocked.CompareExchange(ref this.initialized, 1, 0) != 0)
System.ServiceModel.Discovery (2)
System\ServiceModel\Discovery\DiscoveryClient.cs (1)
924return ((Interlocked.CompareExchange(ref this.closeCalled, 1, 0) == 1) || this.asyncOperationsLifetimeManager.IsAborted);
System\ServiceModel\Discovery\IteratorAsyncResult.cs (1)
78if (Interlocked.CompareExchange(ref this.completedCalled, 1, 0) == 0)
System.ServiceModel.Internals (15)
System\Runtime\Collections\HopperCache.cs (1)
170wasPromoting = Interlocked.CompareExchange(ref this.promoting, 1, 0);
System\Runtime\IOThreadScheduler.cs (12)
213int interlockedResult = Interlocked.CompareExchange(ref this.headTail, ht + Bits.HiOne, ht); 269if (slotLowPri == (slotLowPri = Interlocked.CompareExchange(ref this.headTailLowPri, 279if (slot == (slot = Interlocked.CompareExchange(ref this.headTail, Bits.IncrementLo(slot), slot))) 303if (slot == Interlocked.CompareExchange(ref this.headTail, slot + Bits.HiOne, slot)) 333if (slot == (slot = Interlocked.CompareExchange(ref this.headTail, Bits.IncrementLo(slot), slot))) 344if (slotLowPri == (slotLowPri = Interlocked.CompareExchange(ref this.headTailLowPri, 488Interlocked.CompareExchange(ref this.gate, 0, gateSnapshot); 515Interlocked.CompareExchange(ref this.gate, 0, gateSnapshot) != gateSnapshot) 520Interlocked.CompareExchange(ref this.gate, 0, gateSnapshot); 555Interlocked.CompareExchange(ref this.gate, 0, gateSnapshot) != gateSnapshot) 560Interlocked.CompareExchange(ref this.gate, 0, gateSnapshot); 572Interlocked.CompareExchange(ref this.gate, 0, gateSnapshot);
System\Runtime\SignalGate.cs (2)
44lastState = Interlocked.CompareExchange(ref this.state, GateState.SignalPending, GateState.Locked); 68lastState = Interlocked.CompareExchange(ref this.state, GateState.Unlocked, GateState.Locked);
System.Transactions (2)
System\Transactions\Oletx\OletxDependentTransaction.cs (1)
53int localCompleted = Interlocked.CompareExchange( ref this.completed, 1, 0 );
System\Transactions\Oletx\OleTxTransaction.cs (1)
231int localDisposed = Interlocked.CompareExchange( ref this.disposed, 1, 0 );
System.Web (25)
Cache\SqlCacheDependency.cs (2)
783if (Interlocked.CompareExchange(ref dbState._rqInCallback, 1, 0) != 0) { 803if (Interlocked.CompareExchange(ref dbState._rqInCallback, 1, 0) == 0) {
Compilation\BuildResult.cs (1)
353if (Interlocked.CompareExchange(ref _lock, 1, 0) != 0) {
Compilation\CompilationLock.cs (1)
113if (Interlocked.CompareExchange(ref _lockStatus, lockStatus+1, lockStatus) == lockStatus)
Compilation\CompilationUtil.cs (1)
663Interlocked.CompareExchange(ref _maxConcurrentCompilations, maxConcurrentCompilations, 0);
Configuration\serverconfig.cs (2)
89Interlocked.CompareExchange(ref s_iisMajorVersion, version, 0); 148Interlocked.CompareExchange(ref s_useServerConfig, useServerConfig, -1);
HttpContext.cs (2)
1762Interlocked.CompareExchange(ref _timeoutState, 0, 1); 1799if (Interlocked.CompareExchange(ref _timeoutState, -1, 1) == 1) {
Management\WebEvents.cs (2)
100if (Interlocked.CompareExchange( ref _exceptionLogged, 1, 0) == 0) { 2222if (Interlocked.CompareExchange(ref _updatingLastFired, 1, 0) == 0) {
RequestTimeoutManager.cs (1)
74if (Interlocked.CompareExchange(ref _inProgressLock, 1, 0) != 0)
State\InProcStateClientManager.cs (1)
136if (initialFlags == Interlocked.CompareExchange(
State\SessionStateModule.cs (1)
1187if (Interlocked.CompareExchange(ref _rqInCallback, 1, 0) != 0)
State\sqlstateclientmanager.cs (2)
826Interlocked.CompareExchange(ref s_isClearPoolInProgress, 0, 1); 849if (0 == Interlocked.CompareExchange(ref s_isClearPoolInProgress, 1, 0)) {
State\StateRuntime.cs (1)
448if (initialFlags == Interlocked.CompareExchange(
Util\CancellationTokenHelper.cs (2)
47if (Interlocked.CompareExchange(ref _state, STATE_CANCELING, STATE_CREATED) == STATE_CREATED) { 59if (Interlocked.CompareExchange(ref _state, STATE_CANCELED, STATE_CANCELING) == STATE_DISPOSING) {
Util\ReadWriteSpinLock.cs (4)
152test = Interlocked.CompareExchange(ref _bits, newBits, oldBits); 196test = Interlocked.CompareExchange(ref _bits, newBits, oldBits); 214test = Interlocked.CompareExchange(ref _bits, newBits, oldBits); 238if (Interlocked.CompareExchange(ref _bits, oldBits + 1, oldBits) == oldBits) {
Util\SafeBitVector32.cs (2)
39int result = Interlocked.CompareExchange(ref _data, newData, oldData); 66int result = Interlocked.CompareExchange(ref _data, newData, oldData);
System.Xml.Linq (4)
System\Xml\Linq\XLinq.cs (4)
682entryIdx = Interlocked.CompareExchange(ref buckets[bucketIdx], FullList, EndOfList); 693entryIdx = Interlocked.CompareExchange(ref entries[entryIdx].Next, FullList, EndOfList); 807entryIndex = Interlocked.CompareExchange(ref buckets[hashCode & (buckets.Length - 1)], newEntry, EndOfList); 809entryIndex = Interlocked.CompareExchange(ref entries[entryIndex].Next, newEntry, EndOfList);