* the THREADED_RTS and (inc. SMP) runtime.
*/
#if defined(THREADED_RTS)
-Mutex sched_mutex = INIT_MUTEX_VAR;
+Mutex sched_mutex;
#endif
#if defined(PARALLEL_HASKELL)
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) {