diff options
-rw-r--r-- | Source/kwsys/SystemInformation.cxx | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/Source/kwsys/SystemInformation.cxx b/Source/kwsys/SystemInformation.cxx index 94bc22e..f8a37ba 100644 --- a/Source/kwsys/SystemInformation.cxx +++ b/Source/kwsys/SystemInformation.cxx @@ -2186,7 +2186,6 @@ int SystemInformationImplementation::RetreiveInformationFromCpuInfoFile() // Physical ids returned by Linux don't distinguish cores. // We want to record the total number of cores in this->NumberOfPhysicalCPU // (checking only the first proc) - kwsys_stl::string cores = this->ExtractValueFromCpuInfoFile(buffer,"cpu cores"); int numberOfCoresPerCPU=atoi(cores.c_str()); @@ -2194,8 +2193,11 @@ int SystemInformationImplementation::RetreiveInformationFromCpuInfoFile() #else // __CYGWIN__ // does not have "physical id" entries, neither "cpu cores" - // this has to be fixed for hyper-threading. - this->NumberOfPhysicalCPU=this->NumberOfLogicalCPU; + // this has to be fixed for hyper-threading. + kwsys_stl::string cpucount = + this->ExtractValueFromCpuInfoFile(buffer,"cpu count"); + this->NumberOfPhysicalCPU= + this->NumberOfLogicalCPU = atoi(cpucount.c_str()); #endif // LogicalProcessorsPerPhysical>1 => hyperthreading. |