Skip to content
Snippets Groups Projects
Commit 5065c774 authored by jette's avatar jette
Browse files

Fix bug in CPU bind logic

parent 5fb4f738
No related branches found
No related tags found
No related merge requests found
......@@ -290,6 +290,7 @@ static bool _is_power_cpu(void)
is_power = 0;
while (fgets(buffer, sizeof(buffer), cpu_info_file) != NULL) {
if (strstr(buffer, "POWER7")) {
error("buffer:%s", buffer);
is_power = 1;
break;
}
......@@ -297,7 +298,7 @@ static bool _is_power_cpu(void)
fclose(cpu_info_file);
}
if (is_power = 1)
if (is_power == 1)
return true;
return false;
}
......@@ -312,7 +313,7 @@ void reset_cpuset(cpu_set_t *new_mask, cpu_set_t *cur_mask)
cpu_set_t newer_mask;
int cur_offset, new_offset = 0, last_set = -1;
if (!is_power_cpu())
if (!_is_power_cpu())
return;
CPU_ZERO(&newer_mask);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment