18 references to CompareExchange
Aspire.Microsoft.Data.SqlClient (1)
src\Vendoring\OpenTelemetry.Instrumentation.SqlClient\Shared\DiagnosticSourceInstrumentation\DiagnosticSourceSubscriber.cs (1)
87if (Interlocked.CompareExchange(ref this.disposed, 1, 0) == 1)
Aspire.Microsoft.EntityFrameworkCore.SqlServer (1)
src\Vendoring\OpenTelemetry.Instrumentation.SqlClient\Shared\DiagnosticSourceInstrumentation\DiagnosticSourceSubscriber.cs (1)
87if (Interlocked.CompareExchange(ref this.disposed, 1, 0) == 1)
dotnet-svcutil-lib (1)
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\ServiceChannel.cs (1)
2414long last = Interlocked.CompareExchange(ref _lastActivity, 0, 0);
Microsoft.AspNetCore.Server.Kestrel.Core (1)
Internal\Infrastructure\ResourceCounter.cs (1)
47var prev = Interlocked.CompareExchange(ref _count, count + 1, count);
Microsoft.Extensions.Caching.Memory (1)
MemoryCache.cs (1)
511long original = Interlocked.CompareExchange(ref coherentState._cacheSize, newSize, sizeRead);
Microsoft.ML.Data (1)
DataView\CacheDataView.cs (1)
423long rc = Interlocked.CompareExchange(ref _rowCount, rowCount, -1);
System.Collections.Concurrent (1)
System\Collections\Concurrent\PartitionerStatic.cs (1)
1106if (Interlocked.CompareExchange(ref _sharedIndex.Value, newSharedIndex, oldSharedIndex)
System.Diagnostics.DiagnosticSource (1)
System\Diagnostics\RateLimiter.cs (1)
59Interlocked.CompareExchange(ref _intervalStartTicks, currentTicks, intervalStartTicks);
System.Diagnostics.Process (1)
System\Diagnostics\Process.Linux.cs (1)
91long oldValue = Interlocked.CompareExchange(ref s_bootTimeTicks, bootTimeTicks, 0);
System.Private.CoreLib (9)
src\libraries\System.Private.CoreLib\src\System\Threading\Interlocked.cs (7)
422(ulong)CompareExchange(ref Unsafe.As<ulong, long>(ref location1), (long)value, (long)comparand); 442=> Unsafe.BitCast<long, double>(CompareExchange(ref Unsafe.As<double, long>(ref location1), Unsafe.BitCast<double, long>(value), Unsafe.BitCast<double, long>(comparand))); 456return (IntPtr)Interlocked.CompareExchange(ref Unsafe.As<IntPtr, long>(ref location1), (long)value, (long)comparand); 475return (UIntPtr)Interlocked.CompareExchange(ref Unsafe.As<UIntPtr, long>(ref location1), (long)value, (long)comparand); 540CompareExchange( 625long oldValue = CompareExchange(ref location1, newValue, current); 691long oldValue = CompareExchange(ref location1, newValue, current);
src\System\Threading\Interlocked.CoreCLR.cs (2)
141return CompareExchange(ref location1, value, comparand); // Must expand intrinsic 228CompareExchange(ref Unsafe.AsRef(in location), 0, 0);