summaryrefslogtreecommitdiff
path: root/rts/Schedule.c
diff options
context:
space:
mode:
authorSimon Marlow <marlowsd@gmail.com>2009-03-18 15:47:19 +0000
committerSimon Marlow <marlowsd@gmail.com>2009-03-18 15:47:19 +0000
commit31caec794c3978d55d79f715f21fb72948c9f300 (patch)
tree475474eb40efe84d3696177054dea9867c0f9261 /rts/Schedule.c
parent7583384214ed6aa4a90d77c5975728a9b06149f2 (diff)
downloadhaskell-31caec794c3978d55d79f715f21fb72948c9f300.tar.gz
Set thread affinity with +RTS -qa (only on Linux so far)
Diffstat (limited to 'rts/Schedule.c')
-rw-r--r--rts/Schedule.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/rts/Schedule.c b/rts/Schedule.c
index 666b59e3e3..636b5179ad 100644
--- a/rts/Schedule.c
+++ b/rts/Schedule.c
@@ -2125,6 +2125,10 @@ workerStart(Task *task)
cap = task->cap;
RELEASE_LOCK(&task->lock);
+ if (RtsFlags.ParFlags.setAffinity) {
+ setThreadAffinity(cap->no, n_capabilities);
+ }
+
// set the thread-local pointer to the Task:
taskEnter(task);