mirror of
https://github.com/anrieff/libcpuid
synced 2024-11-10 22:59:13 +00:00
Fixed a semantic bug - reported number of logical cpus were per-core, not total. Fixed
git-svn-id: https://svn.code.sf.net/p/libcpuid/code/HEAD/libcpuid@13 3b4be424-7ac5-41d7-8526-f4ddcb85d872
This commit is contained in:
parent
5343f544c1
commit
b888683df8
2 changed files with 2 additions and 2 deletions
|
@ -226,7 +226,7 @@ static void decode_amd_number_of_cores(struct cpu_raw_data_t* raw, struct cpu_id
|
|||
if (data->flags[CPU_FEATURE_HT]) {
|
||||
if (num_cores > 1) {
|
||||
data->num_cores = num_cores;
|
||||
data->num_logical_cpus = logical_cpus / num_cores;
|
||||
data->num_logical_cpus = logical_cpus;
|
||||
} else {
|
||||
data->num_cores = 1;
|
||||
data->num_logical_cpus = (logical_cpus >= 2 ? logical_cpus : 2);
|
||||
|
|
|
@ -399,7 +399,7 @@ static void decode_intel_number_of_cores(struct cpu_raw_data_t* raw,
|
|||
if (data->flags[CPU_FEATURE_HT]) {
|
||||
if (num_cores > 1) {
|
||||
data->num_cores = num_cores;
|
||||
data->num_logical_cpus = logical_cpus / num_cores;
|
||||
data->num_logical_cpus = logical_cpus;
|
||||
} else {
|
||||
data->num_cores = 1;
|
||||
data->num_logical_cpus = (logical_cpus >= 2 ? logical_cpus : 2);
|
||||
|
|
Loading…
Reference in a new issue