X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;ds=sidebyside;f=rts%2FThreads.c;h=9867c1c50e0cccf5bfba1508899c8ab66f8177c0;hb=5270423a6afe69f1dc57e5e5a474812182718d40;hp=3b209ea95b51ccc5b86c795be574f5b835153456;hpb=063b822bb68f84dd9729327bb1765637c25aceb4;p=ghc-hetmet.git diff --git a/rts/Threads.c b/rts/Threads.c index 3b209ea..9867c1c 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 = cap->r.rNursery->threads; + cap->r.rNursery->threads = tso; RELEASE_LOCK(&sched_mutex); // ToDo: report the stack size in the event?