9 references to CompareExchange
System.Private.CoreLib (9)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\CompilerServices\CastCache.cs (2)
302uint versionOrig = Interlocked.CompareExchange(ref pEntry._version, newVersion, version); 365uint versionOrig = Interlocked.CompareExchange(ref pEntry._version, newVersion, version);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\CompilerServices\GenericCache.cs (2)
292uint versionOrig = Interlocked.CompareExchange(ref pEntry.Version, newVersion, version); 356uint versionOrig = Interlocked.CompareExchange(ref pEntry.Version, newVersion, version);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\Lock.cs (1)
1132new State(Interlocked.CompareExchange(ref lockObj._state, toState._state, fromState._state));
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\LowLevelLock.cs (3)
108Interlocked.CompareExchange(ref _state, state + LockedMask, state) == state; 159if (Interlocked.CompareExchange(ref _state, newState, state) == state) 195if (Interlocked.CompareExchange(ref _state, newState, state) == state)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\PortableThreadPool.WorkerTracking.cs (1)
112Interlocked.CompareExchange(ref _data, newCounts._data, oldCounts._data));