projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Fix bug in setThreadAffinity() (Linux)
[ghc-hetmet.git]
/
rts
/
posix
/
OSThreads.c
diff --git
a/rts/posix/OSThreads.c
b/rts/posix/OSThreads.c
index
9bcd56f
..
84b111f
100644
(file)
--- a/
rts/posix/OSThreads.c
+++ b/
rts/posix/OSThreads.c
@@
-224,7
+224,7
@@
setThreadAffinity (nat n, nat m)
nproc = getNumberOfProcessors();
CPU_ZERO(&cs);
for (i = n; i < nproc; i+=m) {
- CPU_SET(n, &cs);
+ CPU_SET(i, &cs);
}
sched_setaffinity(0, sizeof(cpu_set_t), &cs);
}