Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/dotnet/runtime.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Lapounov <antonl@microsoft.com>2021-05-12 01:32:46 +0300
committerGitHub <noreply@github.com>2021-05-12 01:32:46 +0300
commit28ec20194010c2a3d06f2217998cfcb8e8b8fb5e (patch)
tree1a614d0a349df8be3c0275af87bac99d13ebdd3a /src/coreclr/classlibnative
parent31c5a7c86e29b67c3a19cbc2d41e68376d184a46 (diff)
Allow overriding processor count via configuration setting (#52492)
Diffstat (limited to 'src/coreclr/classlibnative')
-rw-r--r--src/coreclr/classlibnative/bcltype/system.cpp16
1 files changed, 1 insertions, 15 deletions
diff --git a/src/coreclr/classlibnative/bcltype/system.cpp b/src/coreclr/classlibnative/bcltype/system.cpp
index 2bcf2d56990..eece2220c63 100644
--- a/src/coreclr/classlibnative/bcltype/system.cpp
+++ b/src/coreclr/classlibnative/bcltype/system.cpp
@@ -182,21 +182,7 @@ INT32 QCALLTYPE SystemNative::GetProcessorCount()
BEGIN_QCALL;
-#ifndef TARGET_UNIX
- CPUGroupInfo::EnsureInitialized();
-
- if (CPUGroupInfo::CanEnableThreadUseAllCpuGroups())
- {
- processorCount = CPUGroupInfo::GetNumActiveProcessors();
- }
- else
-#endif // !TARGET_UNIX
- {
- // This similar to GetSystemInfo() + dwNumberOfProcessors except:
- // - GetCurrentProcessCpuCount() tries to take into account the processor affinity mask where applicable
- // - GetCurrentProcessCpuCount() on Unixes tries to take into account cgroups CPU quota limits where applicable
- processorCount = GetCurrentProcessCpuCount();
- }
+ processorCount = GetCurrentProcessCpuCount();
END_QCALL;