111 references to CompareExchange
mscorlib (30)
system\collections\queue.cs (1)
112System.Threading.Interlocked.CompareExchange(ref _syncRoot, new Object(), null);
system\Lazy.cs (1)
361Interlocked.CompareExchange(ref m_boxed, boxed, null) != null)
system\marshalbyrefobject.cs (1)
153Interlocked.CompareExchange(ref __identity, id, null);
system\rttype.cs (1)
1834Interlocked.CompareExchange(ref s_methodInstantiationsLock, new Object(), null);
system\runtime\remoting\identity.cs (4)
363Interlocked.CompareExchange(ref _tpOrObject, tpObj, null); 385Interlocked.CompareExchange(ref _objRef, objRefGiven, null); 405Interlocked.CompareExchange( 445Interlocked.CompareExchange(
system\runtime\remoting\lifetimeservices.cs (1)
70Interlocked.CompareExchange(ref s_LifetimeSyncObject, o, null);
system\runtime\remoting\message.cs (3)
240Interlocked.CompareExchange(ref _properties, 946Interlocked.CompareExchange(ref _properties, properties, null); 1312Interlocked.CompareExchange(ref _properties, properties, null);
system\runtime\remoting\trackingservices.cs (1)
58Interlocked.CompareExchange(ref s_TrackingServicesSyncObject, o, null);
system\security\cryptography\cryptoconfig.cs (1)
108Interlocked.CompareExchange(ref s_InternalSyncObject, o, null);
system\security\namedpermissionset.cs (1)
208Interlocked.CompareExchange(ref s_InternalSyncObject, o, null);
system\security\policy\applicationsecurityinfo.cs (4)
60Interlocked.CompareExchange(ref m_appId, appId, null); 77Interlocked.CompareExchange(ref m_deployId, deplId, null); 151Interlocked.CompareExchange(ref m_defaultRequest, defaultRequest, null); 182Interlocked.CompareExchange(ref m_appEvidence, appEvidence, null);
system\security\policy\applicationtrust.cs (2)
349Interlocked.CompareExchange(ref s_installReference, 383Interlocked.CompareExchange(ref m_appTrusts, appTrusts, null);
system\security\policy\hashmembershipcondition.cs (1)
38Interlocked.CompareExchange(ref s_InternalSyncObject, o, null);
system\security\policy\policylevel.cs (1)
77Interlocked.CompareExchange(ref s_InternalSyncObject, o, null);
system\security\policymanager.cs (1)
51Interlocked.CompareExchange(ref m_policyLevels, policyLevels, null);
system\security\principal\windowsidentity.cs (1)
589Interlocked.CompareExchange(ref m_groups, groups, null);
system\threading\LazyInitializer.cs (1)
229slock = Interlocked.CompareExchange(ref syncLock, newLock, null);
system\threading\ManualResetEventSlim.cs (1)
265Interlocked.CompareExchange(ref m_lock, newObj, null); // failure is benign.. someone else won the ----.
system\threading\Tasks\Task.cs (3)
4743Interlocked.CompareExchange(ref m_continuationObject, newList, oldValue); 4800if ((m_continuationObject != null) || (Interlocked.CompareExchange(ref m_continuationObject, tc, null) != null)) 4825if (Interlocked.CompareExchange(ref m_continuationObject, new List<object>(), continuationObject) != continuationObject)
System (32)
compmod\system\collections\generic\sortedlist.cs (1)
365System.Threading.Interlocked.CompareExchange(ref _syncRoot, new Object(), null);
compmod\system\collections\generic\sortedset.cs (1)
319System.Threading.Interlocked.CompareExchange(ref _syncRoot, new Object(), null);
compmod\system\collections\specialized\listdictionary.cs (1)
154System.Threading.Interlocked.CompareExchange(ref _syncRoot, new Object(), null);
compmod\system\collections\specialized\nameobjectcollectionbase.cs (1)
525System.Threading.Interlocked.CompareExchange(ref _syncRoot, new Object(), null);
compmod\system\collections\specialized\ordereddictionary.cs (1)
146System.Threading.Interlocked.CompareExchange(ref _syncRoot, new Object(), null);
net\System\Net\_ConnectionGroup.cs (1)
88Interlocked.CompareExchange(ref m_Event, new ManualResetEvent(false), null);
net\System\Net\_LazyAsyncResult.cs (1)
191if (Interlocked.CompareExchange(ref m_Event, waitHandle, null) == null)
net\System\Net\Configuration\AuthenticationModulesSection.cs (1)
126Interlocked.CompareExchange(ref classSyncObject, o, null);
net\System\Net\Configuration\ConnectionManagementSection.cs (1)
71Interlocked.CompareExchange(ref classSyncObject, o, null);
net\System\Net\Configuration\DefaultProxySection.cs (1)
285Interlocked.CompareExchange(ref classSyncObject, o, null);
net\System\Net\Configuration\RequestCachingSection.cs (1)
235Interlocked.CompareExchange(ref classSyncObject, o, null);
net\System\Net\Configuration\SettingsSection.cs (1)
214Interlocked.CompareExchange(ref s_InternalSyncObject, o, null);
net\System\Net\Configuration\SmtpSection.cs (1)
215Interlocked.CompareExchange(ref classSyncObject, new object(), null);
net\System\Net\Configuration\WebRequestModulesSection.cs (1)
99Interlocked.CompareExchange(ref classSyncObject, o, null);
net\System\Net\ConnectionPoolManager.cs (1)
28Interlocked.CompareExchange(ref s_InternalSyncObject, o, null);
net\System\Net\HttpWebRequest.cs (5)
2340object oldResult = Interlocked.CompareExchange(ref m_PendingReturnResult, pendResult, null); 2361object oldResult = Interlocked.CompareExchange(ref m_PendingReturnResult, NclConstants.Sentinel, null); 3528object responseData = Async? Interlocked.CompareExchange(ref _CoreResponse, null, DBNull.Value): _CoreResponse; 3578object responseData = Interlocked.CompareExchange(ref _CoreResponse, responseOrException, DBNull.Value); 3672responseData = Interlocked.CompareExchange(ref _CoreResponse, responseOrException, null);
net\System\Net\Internal.cs (1)
407Interlocked.CompareExchange(ref _LocalAddressesLock, new object(), null);
net\System\Net\Logging.cs (1)
62Interlocked.CompareExchange(ref s_InternalSyncObject, o, null);
net\System\Net\Sockets\Socket.cs (2)
5675Interlocked.CompareExchange(ref s_InternalSyncObject, o, null); 5802Interlocked.CompareExchange(ref m_AcceptQueueOrConnectResult, new Queue(16), null);
net\System\Net\WebRequest.cs (1)
84Interlocked.CompareExchange(ref s_InternalSyncObject, o, null);
net\System\URI.cs (1)
969Interlocked.CompareExchange(ref s_initLock, o, null);
services\monitoring\system\diagnosticts\EventLogInternal.cs (2)
115Interlocked.CompareExchange(ref m_InstanceLockObject, o, null); 127Interlocked.CompareExchange(ref s_InternalSyncObject, o, null);
services\monitoring\system\diagnosticts\PerformanceCounter.cs (1)
61Interlocked.CompareExchange(ref m_InstanceLockObject, o, null);
services\monitoring\system\diagnosticts\PerformanceCounterLib.cs (1)
66Interlocked.CompareExchange(ref s_InternalSyncObject, o, null);
services\monitoring\system\diagnosticts\SharedUtils.cs (1)
37Interlocked.CompareExchange(ref s_InternalSyncObject, o, null);
sys\System\IO\compression\DeflateStreamAsyncResult.cs (1)
55Interlocked.CompareExchange(ref m_Event, new ManualResetEvent(savedCompleted != 0), null);
System.Core (3)
Microsoft\Scripting\Ast\BlockExpression.cs (1)
167Interlocked.CompareExchange(
Microsoft\Scripting\Ast\Expression.cs (1)
301Interlocked.CompareExchange(
System\Diagnostics\PerformanceData\PerfProviderCollection.cs (1)
49Interlocked.CompareExchange(ref s_hiddenInternalSyncObject, o, null);
System.Data.Services.Client (2)
System\Data\Services\Client\BaseAsyncResult.cs (2)
235System.Threading.Interlocked.CompareExchange(ref result.asyncWaitDisposeLock, new object(), null); 457System.Threading.Interlocked.CompareExchange(ref this.asyncWaitDisposeLock, new object(), null);
System.Net (22)
net\PeerToPeer\Collaboration\ContactManager.cs (6)
213Interlocked.CompareExchange(ref m_lockSubLstChangedEvent, o, null); 414Interlocked.CompareExchange(ref m_lockNameChangedEvent, o, null); 621Interlocked.CompareExchange(ref m_lockPresenceChangedEvent, o, null); 833Interlocked.CompareExchange(ref m_lockAppChangedEvent, o, null); 1047Interlocked.CompareExchange(ref m_lockObjChangedEvent, o, null); 1468Interlocked.CompareExchange(ref m_createContactAsyncListLock, o, null);
net\PeerToPeer\Collaboration\PeerApplication.cs (1)
214Interlocked.CompareExchange(ref m_lockAppChangedEvent, o, null);
net\PeerToPeer\Collaboration\PeerCollaboration.cs (5)
186Interlocked.CompareExchange(ref s_contactManagerSyncObject, o, null); 1008Interlocked.CompareExchange(ref s_lockNameChangedEvent, o, null); 1209Interlocked.CompareExchange(ref s_lockPresenceChangedEvent, o, null); 1377Interlocked.CompareExchange(ref s_lockObjChangedEvent, o, null); 1542Interlocked.CompareExchange(ref s_lockAppChangedEvent, o, null);
net\PeerToPeer\Collaboration\PeerContact.cs (5)
186Interlocked.CompareExchange(ref m_isSubscribeLock, o, null); 520Interlocked.CompareExchange(ref m_asyncOpLock, o, null); 1183Interlocked.CompareExchange(ref m_lockAppChangedEvent, o, null); 1435Interlocked.CompareExchange(ref m_lockObjChangedEvent, o, null); 1689Interlocked.CompareExchange(ref m_lockPresenceChangedEvent, o, null);
net\PeerToPeer\Collaboration\PeerEndPoint.cs (1)
186Interlocked.CompareExchange(ref m_lockNameChangedEvent, o, null);
net\PeerToPeer\Collaboration\PeerNearMe.cs (2)
416Interlocked.CompareExchange(ref m_refreshDataAsyncOpLock, o, null); 525Interlocked.CompareExchange(ref s_lockPNMChangedEvent, o, null);
net\PeerToPeer\Collaboration\PeerObject.cs (1)
167Interlocked.CompareExchange(ref m_lockObjChangedEvent, o, null);
net\PeerToPeer\UnsafePeerToPeerMethods.cs (1)
146Interlocked.CompareExchange(ref s_InternalSyncObject, o, null);
System.Runtime.Caching (1)
System\Caching\ChangeMonitor.cs (1)
109Interlocked.CompareExchange(ref _onChangedState, state, NOT_SET);
System.Transactions (13)
System\Transactions\DurableEnlistmentState.cs (1)
142Interlocked.CompareExchange( ref classSyncObject, o, null );
System\Transactions\EnlistmentState.cs (1)
37Interlocked.CompareExchange( ref classSyncObject, o, null );
System\Transactions\InternalTransaction.cs (1)
207Interlocked.CompareExchange( ref classSyncObject, o, null );
System\Transactions\Oletx\OletxTransactionManager.cs (1)
964Interlocked.CompareExchange( ref classSyncObject, o, null );
System\Transactions\TransactionManager.cs (1)
349Interlocked.CompareExchange( ref classSyncObject, o, null );
System\Transactions\TransactionState.cs (1)
759Interlocked.CompareExchange( ref classSyncObject, o, null );
System\Transactions\TransactionTable.cs (5)
40Interlocked.CompareExchange( ref this.syncRoot, new object(), null ); 62Interlocked.CompareExchange( ref this.writerFinishedEvent, new ManualResetEvent( true ), null ); 327WeakReference oldNextSetWeak = (WeakReference)Interlocked.CompareExchange( 355WeakReference oldNextSetWeak = (WeakReference)Interlocked.CompareExchange( 527(WeakReference)Interlocked.CompareExchange( ref lastBucketSet.nextSetWeak, null, nextWeakSet );
System\Transactions\VolatileEnlistmentMultiplexing.cs (1)
80Interlocked.CompareExchange( ref classSyncObject, o, null );
System\Transactions\VolatileEnlistmentState.cs (1)
253Interlocked.CompareExchange( ref classSyncObject, o, null );
System.Web (2)
Hosting\ApplicationManager.cs (2)
693if (Interlocked.CompareExchange(ref _pendingPingCallback, callback, null) == null) { 710if (Interlocked.CompareExchange(ref _pendingPingCallback, null, callback) == callback) {
System.Web.Services (5)
System\Web\Services\Configuration\WebServicesSection.cs (1)
39Interlocked.CompareExchange(ref classSyncObject, o, null);
System\Web\Services\Diagnostics\TraceUtility.cs (1)
32Interlocked.CompareExchange(ref internalSyncObject, o, null);
System\Web\Services\Protocols\ClientProtocol.cs (1)
76Interlocked.CompareExchange(ref s_InternalSyncObject, o, null);
System\Web\Services\Protocols\RemoteDebugger.cs (1)
32Interlocked.CompareExchange(ref s_InternalSyncObject, o, null);
System\Web\Services\Protocols\ServerProtocol.cs (1)
38Interlocked.CompareExchange(ref s_InternalSyncObject, o, null);
System.Workflow.ComponentModel (1)
AuthoringOM\Serializer\FormatterServicesNoSerializableCheck.cs (1)
51Interlocked.CompareExchange(ref s_FormatterServicesSyncObject, o, null);