bugfix for the previous change
parent
e60579e21b
commit
7f7575ed80
|
@ -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) {
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue