bugfix for the previous change

metadata
Wenzel Jakob 2014-07-01 23:45:54 +02:00
parent e60579e21b
commit 7f7575ed80
2 changed files with 3 additions and 2 deletions

View File

@ -360,7 +360,7 @@ void Thread::setCoreAffinity(int coreID) {
}
int actualCoreID = -1, available = 0;
for (int i=0; i<nCores; ++i) {
for (int i=0; i<nLogicalCores; ++i) {
if (!CPU_ISSET_S(i, size, cpuset))
continue;
if (available++ == coreID) {

View File

@ -203,8 +203,9 @@ int getCoreCount() {
}
int availableCores = 0;
for (int i=0; i<nCores; ++i)
for (int i=0; i<nLogicalCores; ++i)
availableCores += CPU_ISSET_S(i, size, cpuset) ? 1 : 0;
nCores = availableCores;
CPU_FREE(cpuset);
}