Skip to content

Commit

Permalink
Fix GetCurrentProcessorId for > 64 CPUs on Windows.
Browse files Browse the repository at this point in the history
  • Loading branch information
VSadov committed Dec 5, 2019
1 parent 8f67999 commit 94b1ff0
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/coreclr/src/vm/comsynchronizable.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1450,6 +1450,12 @@ FCIMPL0(INT32, ThreadNative::GetCurrentProcessorNumber)
{
FCALL_CONTRACT;

#ifndef FEATURE_PAL
PROCESSOR_NUMBER proc_no_cpu_group;
GetCurrentProcessorNumberEx(&proc_no_cpu_group);
return (proc_no_cpu_group.Group << 6) | proc_no_cpu_group.Number;
#else
return ::GetCurrentProcessorNumber();
#endif //!FEATURE_PAL
}
FCIMPLEND;

0 comments on commit 94b1ff0

Please sign in to comment.