7 references to CompareExchange
System.Private.CoreLib (6)
src\libraries\System.Private.CoreLib\src\System\Runtime\CompilerServices\CastCache.cs (2)
310
uint versionOrig = Interlocked.
CompareExchange
(ref pEntry._version, newVersion, version);
373
uint versionOrig = Interlocked.
CompareExchange
(ref pEntry._version, newVersion, version);
src\libraries\System.Private.CoreLib\src\System\Runtime\CompilerServices\GenericCache.cs (2)
291
uint versionOrig = Interlocked.
CompareExchange
(ref pEntry.Version, newVersion, version);
355
uint versionOrig = Interlocked.
CompareExchange
(ref pEntry.Version, newVersion, version);
src\libraries\System.Private.CoreLib\src\System\Threading\Lock.cs (1)
846
new State(Interlocked.
CompareExchange
(ref lockObj._state, toState._state, fromState._state));
src\libraries\System.Private.CoreLib\src\System\Threading\PortableThreadPool.WorkerTracking.cs (1)
112
Interlocked.
CompareExchange
(ref _data, newCounts._data, oldCounts._data));
System.Threading.Tasks.Parallel (1)
System\Threading\Tasks\Parallel.ForEachAsync.cs (1)
114
sizeof(T) == sizeof(uint) ? Interlocked.
CompareExchange
(ref Unsafe.As<T, uint>(ref location), Unsafe.As<T, uint>(ref value), Unsafe.As<T, uint>(ref comparand)) == Unsafe.As<T, uint>(ref comparand) :