[project @ 2005-11-03 16:34:45 by simonmar]
authorsimonmar <unknown>
Thu, 3 Nov 2005 16:34:45 +0000 (16:34 +0000)
committersimonmar <unknown>
Thu, 3 Nov 2005 16:34:45 +0000 (16:34 +0000)
schedulePushWork(): don't attempt to move the thread bound to the
current Task to a different Capability.

ghc/rts/Schedule.c

index 6528fdd..c2426fa 100644 (file)
@@ -779,7 +779,8 @@ schedulePushWork(Capability *cap USED_WHEN_SMP,
        for (; t != END_TSO_QUEUE; t = next) {
            next = t->link;
            t->link = END_TSO_QUEUE;
-           if (t->what_next == ThreadRelocated) {
+           if (t->what_next == ThreadRelocated
+               || t->bound == task) { // don't move my bound thread
                prev->link = t;
                prev = t;
            } else if (i == n_free_caps) {