1
0
Fork 0
mirror of https://github.com/anrieff/libcpuid synced 2024-12-16 16:35:45 +00:00

Query CPU info at least once even if set_cpu_affinity() fails

This commit is contained in:
Robert Kausch 2023-03-10 00:59:04 +01:00 committed by The Tumultuous Unicorn Of Darkness
parent 54ed9a0a17
commit 37462ab492

View file

@ -1076,7 +1076,7 @@ int cpuid_get_all_raw_data(struct cpu_raw_data_array_t* data)
bool affinity_saved = save_cpu_affinity();
cpu_raw_data_array_t_constructor(data, true);
while (set_cpu_affinity(logical_cpu)) {
while (set_cpu_affinity(logical_cpu) || logical_cpu == 0) {
debugf(2, "Getting raw dump for logical CPU %i\n", logical_cpu);
cpuid_grow_raw_data_array(data, logical_cpu + 1);
raw_ptr = &data->raw[logical_cpu];