238 references to CompareExchange
mscorlib (77)
system\collections\arraylist.cs (1)
161System.Threading.Interlocked.CompareExchange<Object>(ref _syncRoot, new Object(), null);
system\collections\bitarray.cs (1)
421System.Threading.Interlocked.CompareExchange<Object>(ref _syncRoot, new Object(), null);
system\Collections\Concurrent\ConcurrentStack.cs (5)
359if (Interlocked.CompareExchange(ref m_head, newNode, newNode.m_next) == newNode.m_next) 431if (Interlocked.CompareExchange(ref m_head, head, tail.m_next) == tail.m_next) 459while (Interlocked.CompareExchange( 556if (Interlocked.CompareExchange(ref m_head, head.m_next, head) == head) 706if (Interlocked.CompareExchange(ref m_head, next.m_next, head) == head)
system\collections\generic\dictionary.cs (1)
594System.Threading.Interlocked.CompareExchange<Object>(ref _syncRoot, new Object(), null);
system\collections\generic\list.cs (1)
167System.Threading.Interlocked.CompareExchange<Object>(ref _syncRoot, new Object(), null);
system\collections\hashtable.cs (2)
1124System.Threading.Interlocked.CompareExchange<Object>(ref _syncRoot, new Object(), null); 1692Interlocked.CompareExchange(ref s_SerializationInfoTable, newTable, null);
system\collections\listdictionaryinternal.cs (1)
125System.Threading.Interlocked.CompareExchange<Object>(ref _syncRoot, new Object(), null);
system\collections\objectmodel\collection.cs (1)
167System.Threading.Interlocked.CompareExchange<Object>(ref _syncRoot, new Object(), null);
system\collections\objectmodel\readonlycollection.cs (1)
112System.Threading.Interlocked.CompareExchange<Object>(ref _syncRoot, new Object(), null);
system\collections\objectmodel\readonlydictionary.cs (3)
293System.Threading.Interlocked.CompareExchange<Object>(ref m_syncRoot, new Object(), null); 442System.Threading.Interlocked.CompareExchange<Object>(ref m_syncRoot, new Object(), null); 541System.Threading.Interlocked.CompareExchange<Object>(ref m_syncRoot, new Object(), null);
system\collections\sortedlist.cs (1)
272System.Threading.Interlocked.CompareExchange<Object>(ref _syncRoot, new Object(), null);
system\collections\stack.cs (1)
85System.Threading.Interlocked.CompareExchange<Object>(ref _syncRoot, new Object(), null);
system\console.cs (2)
119Interlocked.CompareExchange<Object>(ref s_InternalSyncObject, o, null); 138Interlocked.CompareExchange<Object>(ref s_ReadKeySyncObject, o, null);
system\currenttimezone.cs (1)
164Interlocked.CompareExchange<Object>(ref s_InternalSyncObject, o, null);
system\diagnostics\eventing\eventsource.cs (4)
1266Interlocked.CompareExchange(ref m_eventData[eventId].TraceLoggingEventTypes, tlet, null); 1991Interlocked.CompareExchange(ref m_eventData[eventId].TraceLoggingEventTypes, tlet, null); 2071Interlocked.CompareExchange(ref m_eventData[eventId].TraceLoggingEventTypes, eventTypes, null); 4580Interlocked.CompareExchange(ref s_EventSources, new List<WeakReference>(2), null);
System\Diagnostics\Eventing\TraceLogging\ConcurrentSet.cs (1)
109newItems = Interlocked.CompareExchange(ref this.items, newItems, oldItems);
System\Diagnostics\Eventing\TraceLogging\SimpleEventTypes.cs (1)
42Interlocked.CompareExchange(ref instance, newInstance, null);
System\Diagnostics\Eventing\TraceLogging\TraceLoggingTypeInfo_T.cs (1)
146Interlocked.CompareExchange(ref instance, newInstance, null);
system\diagnostics\stacktrace.cs (1)
190Interlocked.CompareExchange(ref s_getSourceLineInfo, getSourceLineInfo, null);
system\environment.cs (1)
256Interlocked.CompareExchange<Object>(ref s_InternalSyncObject, o, null);
system\globalization\cultureinfo.cs (1)
1002Interlocked.CompareExchange<CultureInfo>(ref m_parent, culture, null);
system\io\filestream.cs (1)
215if (Interlocked.CompareExchange<ManualResetEvent>(ref _waitHandle, mre, null) == null) {
system\multicastdelegate.cs (1)
198if (a[index] == null && System.Threading.Interlocked.CompareExchange<Object>(ref a[index], o, null) == null)
system\reflection\assembly.cs (2)
1321Interlocked.CompareExchange<object>(ref m_syncRoot, new object(), null); 1451Interlocked.CompareExchange<string>(ref m_fullname, s, null);
system\reflection\ConstructorInfo.cs (1)
303RemotingMethodCachedData ret = Interlocked.CompareExchange(ref m_cachedData, cache, null);
system\reflection\fieldinfo.cs (1)
266RemotingFieldCachedData ret = Interlocked.CompareExchange(ref m_cachedData, cache, null);
system\reflection\methodinfo.cs (1)
289RemotingMethodCachedData ret = Interlocked.CompareExchange(ref m_cachedData, cache, null);
system\reflection\parameterinfo.cs (1)
794RemotingParameterCachedData ret = Interlocked.CompareExchange(ref m_cachedData, cache, null);
system\rttype.cs (2)
1648existingCache = Interlocked.CompareExchange(ref m_cache, newCache, null); 1953RemotingTypeCachedData ret = Interlocked.CompareExchange(ref m_cachedData, cache, null);
system\runtime\interopservices\windowsruntime\eventregistrationtokentable.cs (1)
254Interlocked.CompareExchange(ref refEventTable, new EventRegistrationTokenTable<T>(), null);
system\runtime\serialization\serializationfieldinfo.cs (1)
158RemotingFieldCachedData ret = Interlocked.CompareExchange(ref m_cachedData, cache, null);
system\text\dbcscodepageencoding.cs (1)
253Interlocked.CompareExchange<Object>(ref s_InternalSyncObject, o, null);
system\text\decoderbestfitfallback.cs (1)
79Interlocked.CompareExchange<Object>(ref s_InternalSyncObject, o, null);
system\text\decoderfallback.cs (1)
32Interlocked.CompareExchange<Object>(ref s_InternalSyncObject, o, null);
system\text\encoderbestfitfallback.cs (1)
79Interlocked.CompareExchange<Object>(ref s_InternalSyncObject, o, null);
system\text\encoderfallback.cs (1)
33Interlocked.CompareExchange<Object>(ref s_InternalSyncObject, o, null);
system\text\encoding.cs (1)
399Interlocked.CompareExchange<Object>(ref s_InternalSyncObject, o, null);
system\text\sbcscodepageencoding.cs (1)
148Interlocked.CompareExchange<Object>(ref s_InternalSyncObject, o, null);
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\LazyInitializer.cs (1)
154Interlocked.CompareExchange(ref target, value, null);
system\threading\ManualResetEventSlim.cs (1)
282if (Interlocked.CompareExchange(ref m_eventObj, newEventObj, null) != null)
system\threading\Tasks\BeginEndAwaitableAdapter.cs (1)
136|| Interlocked.CompareExchange(ref _continuation, continuation, null) == CALLBACK_RAN) {
system\threading\Tasks\ParallelRangeManager.cs (1)
114Interlocked.CompareExchange(ref m_indexRanges[m_nCurrentIndexRange].m_nSharedCurrentIndexOffset, new Shared<long>(0), null);
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);
system\threading\Tasks\TaskExceptionHolder.cs (1)
81Interlocked.CompareExchange( ref s_adUnloadEventHandler,
system\threading\Tasks\TaskScheduler.cs (1)
324Interlocked.CompareExchange(ref s_activeTaskSchedulers, new ConditionalWeakTable<TaskScheduler, object>(), null);
system\threading\thread.cs (3)
1204Interlocked.CompareExchange(ref s_asyncLocalCurrentUICulture, new AsyncLocal<CultureInfo>(AsyncLocalSetCurrentUICulture), null); 1315Interlocked.CompareExchange(ref s_asyncLocalCurrentCulture, new AsyncLocal<CultureInfo>(AsyncLocalSetCurrentCulture), null); 1798Interlocked.CompareExchange(ref s_LocalDataStoreMgr, new LocalDataStoreMgr(), null);
system\threading\threadpool.cs (3)
634Interlocked.CompareExchange(ref head.Next, new QueueSegment(), null); 638Interlocked.CompareExchange(ref queueHead, head.Next, head); 684Interlocked.CompareExchange(ref queueTail, tail.Next, tail);
system\timezone.cs (1)
44Interlocked.CompareExchange<Object>(ref s_InternalSyncObject, o, null);
system\type.cs (1)
273Interlocked.CompareExchange<Binder>(ref defaultBinder, binder, null);
PresentationCore (1)
Core\CSharp\System\Windows\Media\TextFormatting\TextFormatterContext.cs (1)
555System.Threading.Interlocked.CompareExchange<Dictionary<char,bool>>(ref _specialCharacters, dict, null);
PresentationFramework (6)
src\Framework\MS\Internal\Data\CollectionViewProxy.cs (1)
1065Interlocked.CompareExchange(ref _indexer, newIndexer, null);
src\Framework\MS\Win32\UxThemeWrapper.cs (1)
219ThemeState currentState = System.Threading.Interlocked.CompareExchange(ref _themeState, newState, themeState);
src\Framework\System\Windows\Data\BindingOperations.cs (2)
589Interlocked.CompareExchange<ExceptionLogger>(ref _exceptionLogger, newLogger, null); 616Interlocked.CompareExchange<ExceptionLogger>(ref _exceptionLogger, null, this);
src\Framework\System\Windows\Data\CollectionView.cs (1)
1768Interlocked.CompareExchange(ref _enumerableWrapper, newWrapper, null);
src\Framework\System\Windows\SystemResources.cs (1)
844string currentName = System.Threading.Interlocked.CompareExchange(ref _themedResourceName, themedResourceName, null);
System (14)
compmod\system\collections\generic\linkedlist.cs (1)
391System.Threading.Interlocked.CompareExchange<Object>(ref _syncRoot, new Object(), null);
compmod\system\collections\generic\queue.cs (1)
103System.Threading.Interlocked.CompareExchange<Object>(ref _syncRoot, new Object(), null);
compmod\system\collections\generic\stack.cs (1)
104System.Threading.Interlocked.CompareExchange<Object>(ref _syncRoot, new Object(), null);
net\System\Net\_ChunkParser.cs (1)
164if (Interlocked.CompareExchange(ref this.userBuffer, userBuffer, null) != null)
net\System\Net\_ConnectStream.cs (4)
173Interlocked.CompareExchange<Exception>(ref m_ErrorException, new IOException(SR.GetString(SR.net_io_readfailure, SR.GetString(SR.net_io_connectionclosed))), null); 1264Interlocked.CompareExchange<Exception>(ref m_ErrorException, userException, null); 3038Interlocked.CompareExchange<Exception>(ref m_ErrorException, new IOException(Msg), null); 3042willThrow &= Interlocked.CompareExchange<Exception>(ref m_ErrorException, exception, null) != null;
net\System\Net\HttpListener.cs (1)
2558Interlocked.CompareExchange<DigestContext[]>(ref m_SavedDigests, new DigestContext[MaximumDigests], null);
net\System\Net\SecureProtocols\_SslState.cs (1)
396Interlocked.CompareExchange<_SslStream>(ref _SecureStream, new _SslStream(this), null);
net\System\Net\Sockets\Socket.cs (1)
7524Interlocked.CompareExchange<ManualResetEvent>(ref m_AsyncEvent, new ManualResetEvent(false), null);
net\System\Net\webclient.cs (1)
1764if ((object)Interlocked.CompareExchange<AsyncOperation>(ref m_AsyncOp, null, asyncOp) == (object) asyncOp)
net\System\Net\WebSockets\WebSocketBase.cs (1)
1440if (Interlocked.CompareExchange<Exception>(ref m_PendingException, exception, null) == null)
services\monitoring\system\diagnosticts\PerformanceCounterLib.cs (1)
610Interlocked.CompareExchange(ref this.customCategoryTable, new Hashtable(StringComparer.OrdinalIgnoreCase), null);
System.Activities (3)
Microsoft\VisualBasic\Activities\VisualBasicHelper.cs (1)
100Interlocked.CompareExchange(ref HostedCompilerCache,
Microsoft\VisualBasic\Activities\XamlIntegration\VisualBasicExpressionConverter.cs (1)
228Interlocked.CompareExchange(ref xmlnsMappings,
System\Activities\Runtime\CallbackWrapper.cs (1)
288Interlocked.CompareExchange(ref ReflectionMemberAccessPermissionSet, myPermissionSet, null);
System.Configuration (1)
System\Configuration\BaseConfigurationRecord.cs (1)
3379Interlocked.CompareExchange(ref s_appConfigPath, appConfigPath, null);
System.Core (6)
Microsoft\Scripting\Actions\CallSiteBinder.cs (1)
219Interlocked.CompareExchange(ref Cache, new Dictionary<Type, object>(), null);
Microsoft\Scripting\Ast\Expression.cs (2)
78Interlocked.CompareExchange( 273Interlocked.CompareExchange<IList<T>>(
Microsoft\Scripting\Compiler\AssemblyGen.cs (1)
53Interlocked.CompareExchange(ref _assembly, new AssemblyGen(), null);
Microsoft\Scripting\Utils\ReadOnlyCollectionBuilder.cs (1)
369System.Threading.Interlocked.CompareExchange<Object>(ref _syncRoot, new Object(), null);
System\IO\BufferedStream2.cs (1)
149Interlocked.CompareExchange(ref _buffer, new byte[bufferSize], null);
System.Data (19)
fx\src\data\System\Data\DataTable.cs (1)
1165view = Interlocked.CompareExchange<DataView>(ref defaultView, view, null);
fx\src\Data\System\Data\ProviderBase\DbConnectionHelper.cs (2)
157Interlocked.CompareExchange(ref _innerConnection, DbConnectionClosedPreviouslyOpened.SingletonInstance, innerConnection); 365bool result = (from == Interlocked.CompareExchange<DbConnectionInternal>(ref _innerConnection, to, from));
fx\src\data\System\Data\SqlClient\SqlCommand.cs (2)
3078Interlocked.CompareExchange(ref _reconnectionCompletionSource, null, completion); 4364Interlocked.CompareExchange(ref _reconnectionCompletionSource, null, completion);
fx\src\data\System\Data\SqlClient\SqlConnection.cs (3)
1215Interlocked.CompareExchange(ref _asyncWaitingForReconnection, waitingTask, null); 1279Interlocked.CompareExchange<Task>(ref _currentReconnectionTask, null, runningReconnect); 1702Interlocked.CompareExchange(ref _asyncWaitingForReconnection, null, asyncWaitingForReconnection);
fx\src\data\System\Data\SqlClient\SqlDataReader.cs (7)
3953Task original = Interlocked.CompareExchange(ref _currentTask, source.Task, null); 4021Task original = Interlocked.CompareExchange(ref _currentTask, source.Task, null); 4113Task original = Interlocked.CompareExchange(ref _currentTask, source.Task, null); 4264Task original = Interlocked.CompareExchange(ref _currentTask, source.Task, null); 4384Task original = Interlocked.CompareExchange(ref _currentTask, source.Task, null); 4485Task original = Interlocked.CompareExchange(ref _currentTask, source.Task, null); 4659Task current = Interlocked.CompareExchange(ref _currentTask, null, source.Task);
fx\src\data\System\Data\SqlClient\SqlSequentialStream.cs (2)
166Task original = Interlocked.CompareExchange<Task>(ref _currentTask, completion.Task, null); 258Interlocked.CompareExchange(ref _currentTask, null, completion.Task);
fx\src\data\System\Data\SqlClient\SqlSequentialTextReader.cs (2)
140Task original = Interlocked.CompareExchange<Task>(ref _currentTask, completion.Task, null); 262Interlocked.CompareExchange(ref _currentTask, null, completion.Task);
System.Data.Entity (47)
System\Data\Common\Utils\AliasGenerator.cs (1)
81System.Threading.Interlocked.CompareExchange(ref _prefixCounter, updatedCache, prefixCounter);
System\Data\Common\Utils\Singleton.cs (1)
52Interlocked.CompareExchange(ref this.value, newValue, null);
System\Data\Mapping\StorageMappingItemLoader.cs (1)
3360System.Threading.Interlocked.CompareExchange(ref s_mappingXmlSchema, set, null);
System\Data\Metadata\Edm\AssociationEndMember.cs (1)
53Interlocked.CompareExchange(ref _getRelatedEndMethod, value, null);
System\Data\Metadata\Edm\AssociationType.cs (1)
65Interlocked.CompareExchange(ref _associationEndMembers,
System\Data\Metadata\Edm\ComplexType.cs (2)
69Interlocked.CompareExchange(ref _properties, 135Interlocked.CompareExchange(ref _constructor, value, null);
System\Data\Metadata\Edm\EdmProperty.cs (2)
132Interlocked.CompareExchange(ref _memberGetter, value, null); 144Interlocked.CompareExchange(ref _memberSetter, value, null);
System\Data\Metadata\Edm\EdmType.cs (1)
285Interlocked.CompareExchange<CollectionType>(ref _collectionType, new CollectionType(this), null);
System\Data\Metadata\Edm\EntitySet.cs (2)
168Interlocked.CompareExchange(ref _foreignKeyDependents, readOnlyDependents, null); 169Interlocked.CompareExchange(ref _foreignKeyPrincipals, readOnlyPrincipals, null);
System\Data\Metadata\Edm\EntityType.cs (5)
160Interlocked.CompareExchange(ref _properties, 178Interlocked.CompareExchange<RefType>(ref _referenceType, new RefType(this), null); 192Interlocked.CompareExchange<RowType>(ref _keyRow, new RowType(keyProperties), null); 266Interlocked.CompareExchange(ref _constructor, value, null); 295Interlocked.CompareExchange(ref _hash, BuildEntityTypeHash(), null);
System\Data\Metadata\Edm\FacetDescription.cs (3)
211Interlocked.CompareExchange(ref _defaultValueFacet, defaultValueFacet, null); 227Interlocked.CompareExchange(ref _nullValueFacet, nullValueFacet, null); 261System.Threading.Interlocked.CompareExchange(
System\Data\Metadata\Edm\ItemCollection.cs (2)
69Interlocked.CompareExchange(ref _functionLookUpTable, functionLookUpTable, null); 203Interlocked.CompareExchange(ref _itemsCache, itemsCache, currentValueForItemCache);
System\Data\Metadata\Edm\MetadataCollection.cs (1)
388CollectionData swappedOutData = Interlocked.CompareExchange<CollectionData>(ref _collectionData, newData, originalData);
System\Data\Metadata\Edm\MetadataItem.cs (1)
98System.Threading.Interlocked.CompareExchange<MetadataCollection<MetadataProperty>>(
System\Data\Metadata\Edm\NavigationPropertyAccessor.cs (5)
64Interlocked.CompareExchange(ref _memberGetter, value, null); 76Interlocked.CompareExchange(ref _memberSetter, value, null); 87Interlocked.CompareExchange(ref _collectionAdd, value, null); 98Interlocked.CompareExchange(ref _collectionRemove, value, null); 109Interlocked.CompareExchange(ref _collectionCreate, value, null);
System\Data\Metadata\Edm\Provider\ClrProviderManifest.cs (1)
227Interlocked.CompareExchange<System.Collections.ObjectModel.ReadOnlyCollection<PrimitiveType>>(ref _primitiveTypes, readOnlyTypes, null);
System\Data\Metadata\Edm\Provider\EdmProviderManifest.cs (5)
199Interlocked.CompareExchange<System.Collections.ObjectModel.ReadOnlyCollection<PrimitiveType>>(ref _primitiveTypes, readOnlyTypes, null); 340Interlocked.CompareExchange<Dictionary<PrimitiveType, System.Collections.ObjectModel.ReadOnlyCollection<FacetDescription>>>(ref _facetDescriptions, 726Interlocked.CompareExchange<System.Collections.ObjectModel.ReadOnlyCollection<EdmFunction>>(ref _functions, readOnlyFunctions, null); 829Interlocked.CompareExchange<System.Collections.ObjectModel.ReadOnlyCollection<PrimitiveType>[]>(ref _promotionTypes, 870Interlocked.CompareExchange<TypeUsage[]>(ref _canonicalModelTypes, canonicalTypes, null);
System\Data\Metadata\Edm\RelationshipType.cs (1)
54Interlocked.CompareExchange(ref _relationshipEndMembers, relationshipEndMembers, null);
System\Data\Metadata\Edm\RowType.cs (1)
93Interlocked.CompareExchange(ref _properties,
System\Data\Metadata\Edm\TypeUsage.cs (3)
386System.Threading.Interlocked.CompareExchange(ref _facets, facets.AsReadOnlyMetadataCollection(), null); 460System.Threading.Interlocked.CompareExchange(ref _modelTypeUsage, result, null); 511System.Threading.Interlocked.CompareExchange(ref _identity, identity, null);
System\Data\Metadata\EdmItemCollection.cs (2)
226Interlocked.CompareExchange(ref _getCanonicalInitializerMetadataMemoizer, new Memoizer<InitializerMetadata, InitializerMetadata>( 438Interlocked.CompareExchange(
System\Data\Metadata\MetadataArtifactLoaderCompositeFile.cs (3)
118Interlocked.CompareExchange(ref _csdlChildren, csdlChildren, null); 123Interlocked.CompareExchange(ref _ssdlChildren, ssdlChildren, null); 128Interlocked.CompareExchange(ref _mslChildren, mslChildren, null);
System\Data\Metadata\MetadataCache.cs (1)
409Interlocked.CompareExchange(ref _artifactLoaderCache, artifactLoaderCacheTemp, _artifactLoaderCache);
System\Data\Metadata\TypeSemantics.cs (1)
1149System.Threading.Interlocked.CompareExchange<objectModel.ReadOnlyCollection<PrimitiveType>[,]>(ref _commonTypeClosure, commonTypeClosure, null);
System.Data.Linq (3)
Mapping\MappingSource.cs (3)
37Interlocked.CompareExchange<MetaModel>(ref this.primaryModel, model, null); 50Interlocked.CompareExchange<Dictionary<Type, MetaModel>>(ref this.secondaryModels, new Dictionary<Type, MetaModel>(), null); 55Interlocked.CompareExchange<ReaderWriterLock>(ref this.rwlock, new ReaderWriterLock(), null);
System.Data.Services (2)
parent\Client\System\Data\Services\Client\ReferenceEqualityComparer.cs (1)
134System.Threading.Interlocked.CompareExchange(ref instance, newInstance, null);
System\Data\Services\WebUtil.cs (1)
1000System.Threading.Interlocked.CompareExchange<ResourceType[]>(ref primitiveResourceTypes, types, null);
System.Data.Services.Client (7)
System\Data\Services\Client\BaseAsyncResult.cs (2)
122System.Threading.Interlocked.CompareExchange(ref this.asyncWait, new System.Threading.ManualResetEvent(this.IsCompleted), null); 385System.Threading.Interlocked.CompareExchange(ref this.failure, e, null);
System\Data\Services\Client\DataServiceContext.cs (3)
3572System.Threading.Interlocked.CompareExchange(ref this.identityToDescriptor, new Dictionary<String, EntityDescriptor>(EqualityComparer<String>.Default), null); 4501System.Threading.Interlocked.CompareExchange(ref this.request, null, pereq); 4504System.Threading.Interlocked.CompareExchange(ref this.batchResponse, pereq.HttpWebResponse, null);
System\Data\Services\Client\ReferenceEqualityComparer.cs (1)
134System.Threading.Interlocked.CompareExchange(ref instance, newInstance, null);
System\Data\Services\Client\Util.cs (1)
255System.Threading.Interlocked.CompareExchange(ref Util.whitespaceForTracing, tmp, whitespace);
System.Runtime.Caching (8)
System\Caching\CacheMemoryMonitor.cs (2)
117if (sref != null && Interlocked.CompareExchange(ref _sizedRefMultiple, null, sref) == sref) { 255Interlocked.CompareExchange(ref s_memoryCacheManager, memoryCacheManager, null);
System\Caching\ChangeMonitor.cs (1)
215if (Interlocked.CompareExchange(ref _onChangedCallback, onChangedCallback, null) != null) {
System\Caching\HostFileChangeMonitor.cs (1)
90Interlocked.CompareExchange(ref s_fcn, fcn, null);
System\Caching\MemoryCacheStatistics.cs (1)
257if (timerHandleRef != null && Interlocked.CompareExchange(ref _timerHandleRef, null, timerHandleRef) == timerHandleRef) {
System\Caching\ObjectCache.cs (1)
33if (Interlocked.CompareExchange(ref _host, value, null) != null) {
System\Caching\PerfCounters.cs (2)
54Interlocked.CompareExchange(ref s_appId, appId, null); 134if (counters != null && Interlocked.CompareExchange(ref _counters, null, counters) == counters) {
System.Runtime.DurableInstancing (1)
System\Runtime\DurableInstancing\InstancePersistenceEvent.cs (1)
76Interlocked.CompareExchange<T>(ref instance, new T(), null);
System.ServiceModel (5)
System\ServiceModel\Channels\HttpRequestContext.cs (1)
812byte[] buffer = Interlocked.CompareExchange<byte[]>(ref this.webSocketInternalBuffer, null, this.webSocketInternalBuffer);
System\ServiceModel\Transactions\WsatProxy.cs (1)
379Interlocked.CompareExchange<byte[]>(ref fixedPropagationToken, token, null);
System\UriTemplate.cs (3)
268Interlocked.CompareExchange<IDictionary<string, string>>(ref this.defaults, new UriTemplateDefaults(this), null); 1180Interlocked.CompareExchange<ReadOnlyCollection<string>>(ref this.pathSegmentVariableNamesSnapshot, new ReadOnlyCollection<string>( 1192Interlocked.CompareExchange<ReadOnlyCollection<string>>(ref this.queryValueVariableNamesSnapshot, new ReadOnlyCollection<string>(
System.ServiceModel.Activities (1)
System\ServiceModel\Activities\WorkflowControlEndpoint.cs (1)
120Interlocked.CompareExchange(ref defaultBaseUri, tempUri, null);
System.ServiceModel.Channels (1)
System\ServiceModel\Channels\XmlByteStreamWriter.cs (1)
46Interlocked.CompareExchange<XmlWriterSettings>(ref this.settings, newSettings, null);
System.ServiceModel.Internals (2)
System\Runtime\IOThreadScheduler.cs (2)
180Interlocked.CompareExchange<IOThreadScheduler>(ref IOThreadScheduler.current, next, this); 238Interlocked.CompareExchange<IOThreadScheduler>(ref IOThreadScheduler.current, next, this);
System.Transactions (5)
System\Transactions\Oletx\OletxEnlistment.cs (2)
1165Interlocked.CompareExchange<Exception>( ref this.oletxTransaction.realOletxTransaction.innerException, e, null ); 1321Interlocked.CompareExchange<Exception>( ref this.oletxTransaction.realOletxTransaction.innerException, e, null );
System\Transactions\Oletx\OleTxTransaction.cs (1)
1231Interlocked.CompareExchange<Exception>( ref this.innerException, comException, null );
System\Transactions\Oletx\OletxVolatileEnlistment.cs (1)
1673Interlocked.CompareExchange<Exception>( ref this.oletxTransaction.realOletxTransaction.innerException, e, null );
System\Transactions\TransactionTable.cs (1)
672Bucket oldBucket = Interlocked.CompareExchange( ref this.owningSet.headBucket, newBucket, this );
System.Web (14)
Hosting\ApplicationManager.cs (1)
130object originalValue = Interlocked.CompareExchange(ref _fatalException, e, null);
Hosting\AsyncResultBase.cs (1)
65Thread originalThread = Interlocked.CompareExchange(ref _threadWhichStartedOperation, Thread.CurrentThread, null);
Hosting\HostingEnvironment.cs (1)
1194scheduler = Interlocked.CompareExchange(ref _backgroundWorkScheduler, newlyCreatedScheduler, null) ?? newlyCreatedScheduler;
Hosting\IIS7WorkerRequest.cs (3)
537if (Interlocked.CompareExchange(ref _asyncResultBase, ar, null) != null) 615if (Interlocked.CompareExchange(ref _asyncResultBase, ar, null) != null) 2638Interlocked.CompareExchange(ref s_DefaultAllocator, alloc, null);
Hosting\ISAPIWorkerRequest.cs (2)
2534if (Interlocked.CompareExchange(ref _asyncResultBase, ar, null) != null) 2616if (Interlocked.CompareExchange(ref _asyncResultBase, ar, null) != null)
HttpApplication.cs (1)
334Interlocked.CompareExchange(ref _allocator, alloc, null);
HttpAsyncResult.cs (1)
111Thread originalThread = Interlocked.CompareExchange(ref _threadWhichStartedOperation, Thread.CurrentThread, null);
HttpRuntime.cs (1)
356if (timer != null && Interlocked.CompareExchange(ref _appDomainShutdownTimer, null, timer) == timer) {
HttpWriter.cs (1)
961Interlocked.CompareExchange(ref s_DefaultAllocator, alloc, null);
UI\LegacyPageAsyncTaskManager.cs (1)
369if (timer != null && Interlocked.CompareExchange(ref _timeoutTimer, null, timer) == timer) {
Util\SynchronizationHelper.cs (1)
40get { return Interlocked.CompareExchange(ref _currentThread, null, null); }
System.Xml (9)
System\Xml\Schema\FacetChecker.cs (1)
1111Interlocked.CompareExchange(ref languagePattern, langRegex, null);
System\Xml\Schema\Preprocessor.cs (1)
414Interlocked.CompareExchange<XmlSchema>(ref builtInSchemaForXmlNS, tempSchema, null);
System\Xml\Schema\XmlSchemaSet.cs (1)
73Interlocked.CompareExchange<Object>(ref internalSyncObject, o, null);
System\Xml\Schema\XmlSchemaValidator.cs (4)
2074Interlocked.CompareExchange<XmlSchemaAttribute>(ref xsiTypeSO, tempXsiTypeSO, null); 2081Interlocked.CompareExchange<XmlSchemaAttribute>(ref xsiNilSO, tempxsiNilSO, null); 2089Interlocked.CompareExchange<XmlSchemaAttribute>(ref xsiSLSO, tempxsiSLSO, null); 2097Interlocked.CompareExchange<XmlSchemaAttribute>(ref xsiNoNsSLSO, tempxsiNoNsSLSO, null);
System\Xml\XmlCharType.cs (1)
401Interlocked.CompareExchange<object>( ref s_Lock, o, null );
System\Xml\XmlUrlResolver.cs (1)
27Interlocked.CompareExchange<object>( ref s_DownloadManager, dm, null );
System.Xml.Linq (4)
System\Xml\Linq\XLinq.cs (3)
440Interlocked.CompareExchange(ref namespaces, new XHashtable<WeakReference>(ExtractNamespace, NamespacesCapacity), null); 508Interlocked.CompareExchange(ref refNmsp, new WeakReference(new XNamespace(namespaceName)), refOld); 2362Interlocked.CompareExchange<object>(ref content, t, s);
System\Xml\Linq\XNodeNavigator.cs (1)
760System.Threading.Interlocked.CompareExchange(ref XmlNamespaceDeclaration, new XAttribute(XNamespace.Xmlns.GetName("xml"), XNamespace.xmlPrefixNamespace), null);
WindowsBase (2)
Base\System\Collections\ObjectModel\WeakReadOnlyCollection.cs (1)
140System.Threading.Interlocked.CompareExchange<Object>(ref _syncRoot, new Object(), null);
Base\System\Windows\Threading\DispatcherObject.cs (1)
63Interlocked.CompareExchange<Dispatcher>(ref _sentinelDispatcher, sentinelDispatcher, null);