Commit 5ec78d7d by Jean-Louis Leroy

Do not CpuScalingEnabled on Windows.

parent cf830f73
...@@ -394,6 +394,7 @@ int NumCPUs(void) { ...@@ -394,6 +394,7 @@ int NumCPUs(void) {
: nullptr) : nullptr)
bool CpuScalingEnabled() { bool CpuScalingEnabled() {
#ifndef OS_WINDOWS
// On Linux, the CPUfreq subsystem exposes CPU information as files on the // On Linux, the CPUfreq subsystem exposes CPU information as files on the
// local file system. If reading the exported files fails, then we may not be // local file system. If reading the exported files fails, then we may not be
// running on Linux, so we silently ignore all the read errors. // running on Linux, so we silently ignore all the read errors.
...@@ -407,6 +408,7 @@ bool CpuScalingEnabled() { ...@@ -407,6 +408,7 @@ bool CpuScalingEnabled() {
fclose(file); fclose(file);
if (memprefix(buff, bytes_read, "performance") == nullptr) return true; if (memprefix(buff, bytes_read, "performance") == nullptr) return true;
} }
#endif
return false; return false;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment