X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=rts%2FThreads.c;h=281cb65e482238968c68a023d6ba8a358d7fd533;hb=d572aed64d9c40dcc38a49b09d18f301555e4efb;hp=efdf772d2357cae8d53c43500f2e06c5e4190875;hpb=04cddd339c000df6d02c90ce59dbffa58d2fe166;p=ghc-hetmet.git diff --git a/rts/Threads.c b/rts/Threads.c index efdf772..281cb65 100644 --- a/rts/Threads.c +++ b/rts/Threads.c @@ -145,8 +145,8 @@ createThread(Capability *cap, nat size) */ ACQUIRE_LOCK(&sched_mutex); tso->id = next_thread_id++; // while we have the mutex - tso->global_link = all_threads; - all_threads = tso; + tso->global_link = g0s0->threads; + g0s0->threads = tso; RELEASE_LOCK(&sched_mutex); #if defined(DIST) @@ -510,7 +510,7 @@ unblockOne_ (Capability *cap, StgTSO *tso, context_switch = 1; } else { // we'll try to wake it up on the Capability it was last on. - wakeupThreadOnCapability_lock(tso->cap, tso); + wakeupThreadOnCapability(cap, tso->cap, tso); } #else appendToRunQueue(cap,tso); @@ -771,7 +771,7 @@ void printAllThreads(void) { StgTSO *t, *next; - nat i; + nat i, s; Capability *cap; # if defined(GRAN) @@ -799,7 +799,8 @@ printAllThreads(void) } debugBelch("other threads:\n"); - for (t = all_threads; t != END_TSO_QUEUE; t = next) { + for (s = 0; s < total_steps; s++) { + for (t = all_steps[s].threads; t != END_TSO_QUEUE; t = next) { if (t->why_blocked != NotBlocked) { printThreadStatus(t); } @@ -808,6 +809,7 @@ printAllThreads(void) } else { next = t->global_link; } + } } }