diff options
Diffstat (limited to 'src/classlibnative/bcltype/system.cpp')
-rw-r--r-- | src/classlibnative/bcltype/system.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/classlibnative/bcltype/system.cpp b/src/classlibnative/bcltype/system.cpp index 402a215e9f..e38f7db292 100644 --- a/src/classlibnative/bcltype/system.cpp +++ b/src/classlibnative/bcltype/system.cpp @@ -352,6 +352,13 @@ INT32 QCALLTYPE SystemNative::GetProcessorCount() processorCount = systemInfo.dwNumberOfProcessors; } +#ifdef FEATURE_PAL + uint32_t cpuLimit; + + if (PAL_GetCpuLimit(&cpuLimit) && cpuLimit < (uint32_t)processorCount) + processorCount = cpuLimit; +#endif + END_QCALL; return processorCount; |