X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=rts%2FThreads.c;h=799cf9062afc3f4f2e02620d17c92b653d985e93;hb=f4b727487a65e6b611bbaafbd2207bd63a8df706;hp=3b209ea95b51ccc5b86c795be574f5b835153456;hpb=a5288c551349a0adab0d931a429b10a096d9444d;p=ghc-hetmet.git diff --git a/rts/Threads.c b/rts/Threads.c index 3b209ea..799cf90 100644 --- a/rts/Threads.c +++ b/rts/Threads.c @@ -63,7 +63,7 @@ createThread(Capability *cap, nat size) } size = round_to_mblocks(size); - tso = (StgTSO *)allocateLocal(cap, size); + tso = (StgTSO *)allocate(cap, size); stack_size = size - TSO_STRUCT_SIZEW; TICK_ALLOC_TSO(stack_size, 0); @@ -102,8 +102,8 @@ createThread(Capability *cap, nat size) */ ACQUIRE_LOCK(&sched_mutex); tso->id = next_thread_id++; // while we have the mutex - tso->global_link = g0s0->threads; - g0s0->threads = tso; + tso->global_link = g0->threads; + g0->threads = tso; RELEASE_LOCK(&sched_mutex); // ToDo: report the stack size in the event? @@ -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); }