179 references to CompareExchange
dotnet-svcutil-lib (12)
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\WebSocketTransportDuplexSessionChannel.cs (7)
330if (Interlocked.CompareExchange(ref _cleanupStatus, WebSocketHelper.OperationFinished, WebSocketHelper.OperationNotStarted) == WebSocketHelper.OperationNotStarted)
510if (Interlocked.CompareExchange(ref _asyncReceiveState, AsyncReceiveState.Cancelled, AsyncReceiveState.Started) == AsyncReceiveState.Started)
725int currentState = Interlocked.CompareExchange(ref _asyncReceiveState, AsyncReceiveState.Started, AsyncReceiveState.Finished);
806if (Interlocked.CompareExchange(ref _asyncReceiveState, AsyncReceiveState.Finished, AsyncReceiveState.Started) == AsyncReceiveState.Started)
1181if (Interlocked.CompareExchange(ref _endOfMessageWritten, WebSocketHelper.OperationFinished, WebSocketHelper.OperationNotStarted) == WebSocketHelper.OperationNotStarted)
1259if (Interlocked.CompareExchange(ref _messageSourceCleanState, WebSocketHelper.OperationFinished, WebSocketHelper.OperationNotStarted) == WebSocketHelper.OperationNotStarted)
1301if (Interlocked.CompareExchange(ref _endOfMessageWritten, WebSocketHelper.OperationFinished, WebSocketHelper.OperationNotStarted) == WebSocketHelper.OperationNotStarted)
Microsoft.AspNetCore.Server.Kestrel.Core (2)
Microsoft.AspNetCore.Server.Kestrel.Microbenchmarks (1)
Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets (1)
Microsoft.AspNetCore.SignalR.Core (1)
Microsoft.Build (3)
Microsoft.CodeAnalysis (7)
Microsoft.CodeAnalysis.CodeStyle (2)
Microsoft.CodeAnalysis.CSharp (9)
Microsoft.CodeAnalysis.LanguageServer (1)
Microsoft.CodeAnalysis.Remote.ServiceHub (1)
Microsoft.CodeAnalysis.Scripting (1)
Microsoft.CodeAnalysis.VisualBasic (8)
Microsoft.CodeAnalysis.Workspaces (4)
Microsoft.CodeAnalysis.Workspaces.MSBuild (1)
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (4)
Microsoft.DotNet.RemoteExecutor (1)
Microsoft.Extensions.Caching.Hybrid (1)
Microsoft.Extensions.Caching.Memory (1)
Microsoft.Extensions.Http.Diagnostics (1)
Microsoft.Extensions.Telemetry (1)
Microsoft.Extensions.TimeProvider.Testing (1)
Microsoft.ML.AutoML.Interactive (1)
Microsoft.ML.Data (1)
Microsoft.NET.StringTools (1)
Microsoft.VisualStudio.LanguageServices (2)
MSBuildTaskHost (3)
PresentationCore (1)
PresentationFramework (6)
System.Collections.Concurrent (2)
System.ComponentModel.Composition (10)
System.ComponentModel.Composition.Registration (3)
System.Configuration.ConfigurationManager (1)
System.Console (1)
System.Data.Odbc (1)
System.Net.Http (1)
System.Net.HttpListener (3)
System.Net.Mail (3)
System.Net.Quic (6)
System.Net.Requests (7)
System.Net.Security (2)
System.Private.CoreLib (25)
System.Private.Xml.Linq (4)
System.Runtime.Caching (3)
System.Security.Cryptography (1)
System.Text.Json (2)
System.Text.RegularExpressions.Generator (1)
System.Threading (15)
System\Threading\ReaderWriterLock.cs (12)
85if (Interlocked.CompareExchange(ref _state, LockStates.Reader, 0) == 0)
132currentState = Interlocked.CompareExchange(ref _state, knownState + LockStates.Reader, knownState);
186currentState = Interlocked.CompareExchange(ref _state, knownState + LockStates.WaitingReader, knownState);
287if (Interlocked.CompareExchange(ref _state, LockStates.Writer, 0) == 0)
313currentState = Interlocked.CompareExchange(ref _state, knownState + LockStates.Writer, knownState);
356currentState = Interlocked.CompareExchange(ref _state, knownState + LockStates.WaitingWriter, knownState);
533currentState = Interlocked.CompareExchange(ref _state, knownState + modifyState, knownState);
641currentState = Interlocked.CompareExchange(ref _state, knownState + modifyState, knownState);
702int knownState = Interlocked.CompareExchange(ref _state, LockStates.Writer, LockStates.Reader);
811currentState = Interlocked.CompareExchange(ref _state, knownState + modifyState, knownState);
941if (Interlocked.CompareExchange(ref _state, LockStates.Writer, 0) == 0)
958Interlocked.CompareExchange(ref _state, knownState + LockStates.Reader, knownState) == knownState)
System.Threading.Channels (1)
System.Threading.RateLimiting (2)
System.Threading.Tasks.Dataflow (4)
System.Threading.Tasks.Parallel (1)
System.Xaml (1)