projects
/
ghc-hetmet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
77998ef
)
Fix bug in setThreadAffinity() (Linux)
author
Simon Marlow
<marlowsd@gmail.com>
Fri, 20 Mar 2009 10:04:46 +0000
(10:04 +0000)
committer
Simon Marlow
<marlowsd@gmail.com>
Fri, 20 Mar 2009 10:04:46 +0000
(10:04 +0000)
rts/posix/OSThreads.c
patch
|
blob
|
history
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);
}