From a663e6784291b5639e243724a55d9417429e5a18 Mon Sep 17 00:00:00 2001 From: simonmar Date: Mon, 9 May 2005 10:18:05 +0000 Subject: [PATCH] [project @ 2005-05-09 10:18:05 by simonmar] printAllThreads: handle ThreadRelocated --- ghc/rts/Schedule.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/ghc/rts/Schedule.c b/ghc/rts/Schedule.c index ad27b74..7075b20 100644 --- a/ghc/rts/Schedule.c +++ b/ghc/rts/Schedule.c @@ -4160,7 +4160,7 @@ printAllThreads(void) debugBelch("all threads:\n"); # endif - for (t = all_threads; t != END_TSO_QUEUE; t = t->global_link) { + for (t = all_threads; t != END_TSO_QUEUE; ) { debugBelch("\tthread %d @ %p ", t->id, (void *)t); #if defined(DEBUG) { @@ -4168,8 +4168,14 @@ printAllThreads(void) if (label) debugBelch("[\"%s\"] ",(char *)label); } #endif - printThreadStatus(t); - debugBelch("\n"); + if (t->what_next == ThreadRelocated) { + debugBelch("has been relocated...\n"); + t = t->link; + } else { + printThreadStatus(t); + debugBelch("\n"); + t = t->global_link; + } } } -- 1.7.10.4