forked from OSchip/llvm-project
[sanitizer] Implement GetNumberOfCPUs for Windows
Summary: Implement `GetNumberOfCPUs` using `GetNativeSystemInfo`. The only consummer of this function is Scudo which is not functional on Windows yet. Reviewers: rnk, zturner Reviewed By: zturner Subscribers: zturner, kubamracek, delcypher, #sanitizers, llvm-commits Differential Revision: https://reviews.llvm.org/D42547 llvm-svn: 323462
This commit is contained in:
parent
26d9bdb72f
commit
896c1c0746
|
@ -1106,9 +1106,10 @@ bool GetRandom(void *buffer, uptr length, bool blocking) {
|
|||
UNIMPLEMENTED();
|
||||
}
|
||||
|
||||
// FIXME: implement on this platform.
|
||||
u32 GetNumberOfCPUs() {
|
||||
UNIMPLEMENTED();
|
||||
SYSTEM_INFO sysinfo = {0};
|
||||
GetNativeSystemInfo(&sysinfo);
|
||||
return sysinfo.dwNumberOfProcessors;
|
||||
}
|
||||
|
||||
} // namespace __sanitizer
|
||||
|
|
Loading…
Reference in New Issue