[project @ 2005-05-09 10:10:33 by simonmar]
authorsimonmar <unknown>
Mon, 9 May 2005 10:10:33 +0000 (10:10 +0000)
committersimonmar <unknown>
Mon, 9 May 2005 10:10:33 +0000 (10:10 +0000)
deleteAllThreads: handle ThreadRelocated

ghc/rts/Schedule.c

index 036c5b0..ad27b74 100644 (file)
@@ -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