1
0
Fork 0
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:
Veselin Georgiev 2008-11-18 13:18:04 +00:00
parent 5343f544c1
commit b888683df8
2 changed files with 2 additions and 2 deletions

View file

@ -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);

View file

@ -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);