X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=rts%2FThreads.c;h=8eaa951a2d0bea76097a0660ec9b09922b961d8f;hb=68b77366cbb16ff237320cca7260909050c41a50;hp=9867c1c50e0cccf5bfba1508899c8ab66f8177c0;hpb=5270423a6afe69f1dc57e5e5a474812182718d40;p=ghc-hetmet.git diff --git a/rts/Threads.c b/rts/Threads.c index 9867c1c..8eaa951 100644 --- a/rts/Threads.c +++ b/rts/Threads.c @@ -102,12 +102,12 @@ createThread(Capability *cap, nat size) */ ACQUIRE_LOCK(&sched_mutex); tso->id = next_thread_id++; // while we have the mutex - tso->global_link = cap->r.rNursery->threads; - cap->r.rNursery->threads = tso; + tso->global_link = g0->threads; + g0->threads = tso; RELEASE_LOCK(&sched_mutex); // ToDo: report the stack size in the event? - traceSchedEvent (cap, EVENT_CREATE_THREAD, tso, tso->stack_size); + traceEventCreateThread(cap, tso); return tso; } @@ -254,7 +254,7 @@ unblockOne_ (Capability *cap, StgTSO *tso, cap->context_switch = 1; #endif - traceSchedEvent (cap, EVENT_THREAD_WAKEUP, tso, tso->cap->no); + traceEventThreadWakeup (cap, tso, tso->cap->no); return next; } @@ -387,7 +387,7 @@ void printAllThreads(void) { StgTSO *t, *next; - nat i, s; + nat i, g; Capability *cap; # if defined(GRAN) @@ -415,8 +415,8 @@ printAllThreads(void) } debugBelch("other threads:\n"); - for (s = 0; s < total_steps; s++) { - for (t = all_steps[s].threads; t != END_TSO_QUEUE; t = next) { + for (g = 0; g < RtsFlags.GcFlags.generations; g++) { + for (t = generations[g].threads; t != END_TSO_QUEUE; t = next) { if (t->why_blocked != NotBlocked) { printThreadStatus(t); }