system\threading\CancellationTokenSource.cs (7)
189if (Interlocked.CompareExchange(ref m_kernelEvent, mre, null) != null)
487if (Interlocked.CompareExchange(ref m_timer, newTimer, null) != null)
675registeredCallbacksLists = Interlocked.CompareExchange(ref m_registeredCallbacksLists, list, null);
684Interlocked.CompareExchange(ref (registeredCallbacksLists[myIndex]), callBackArray, null);
1122if (curr.m_elements[tryIndex] == null && Interlocked.CompareExchange(ref curr.m_elements[tryIndex], element, null) == null)
1140if (Interlocked.CompareExchange(ref tail.m_next, newTail, null) == null)
1226T prevailingValue = Interlocked.CompareExchange(ref m_elements[index], null, expectedElement);
system\threading\Tasks\Task.cs (5)
1099if (Interlocked.CompareExchange(ref m_taskScheduler, scheduler, null) != null)
1201if (Interlocked.CompareExchange(ref m_taskScheduler, scheduler, null) != null)
1674if (Interlocked.CompareExchange(ref contingentProps.m_completionEvent, newMre, null) != null)
2032if (Interlocked.CompareExchange(ref props.m_exceptionsHolder, holder, null) != null)
2383Interlocked.CompareExchange(ref props.m_exceptionalChildren, new List<Task>(), null);