From: Simon Marlow Date: Tue, 17 Jun 2008 13:46:51 +0000 (+0000) Subject: small interpreter fix X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=commitdiff_plain;h=dad784757de1cbe15a78b580ba6e1ac4b6326317 small interpreter fix --- diff --git a/rts/Schedule.c b/rts/Schedule.c index 715517e..fd84fde 100644 --- a/rts/Schedule.c +++ b/rts/Schedule.c @@ -550,8 +550,6 @@ schedule (Capability *initialCapability, Task *task) } #endif - cap->r.rCurrentTSO = t; - /* context switches are initiated by the timer signal, unless * the user specified "context switch as often as possible", with * +RTS -C0 @@ -563,6 +561,11 @@ schedule (Capability *initialCapability, Task *task) run_thread: + // CurrentTSO is the thread to run. t might be different if we + // loop back to run_thread, so make sure to set CurrentTSO after + // that. + cap->r.rCurrentTSO = t; + debugTrace(DEBUG_sched, "-->> running thread %ld %s ...", (long)t->id, whatNext_strs[t->what_next]);