From: simonmar Date: Mon, 9 May 2005 10:10:33 +0000 (+0000) Subject: [project @ 2005-05-09 10:10:33 by simonmar] X-Git-Tag: Initial_conversion_from_CVS_complete~587 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=32baf1e3e995d7fce53d0659cb84c490eadbca12;p=ghc-hetmet.git [project @ 2005-05-09 10:10:33 by simonmar] deleteAllThreads: handle ThreadRelocated --- diff --git a/ghc/rts/Schedule.c b/ghc/rts/Schedule.c index 036c5b0..ad27b74 100644 --- a/ghc/rts/Schedule.c +++ b/ghc/rts/Schedule.c @@ -2093,8 +2093,12 @@ deleteAllThreads ( void ) StgTSO* t, *next; IF_DEBUG(scheduler,sched_belch("deleting all threads")); for (t = all_threads; t != END_TSO_QUEUE; t = next) { - next = t->global_link; - deleteThread(t); + if (t->what_next == ThreadRelocated) { + next = t->link; + } else { + next = t->global_link; + deleteThread(t); + } } // The run queue now contains a bunch of ThreadKilled threads. We