X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=rts%2FSchedule.c;h=cb2f7f3e870b3afe6755f5d974fc1ad69ff2a955;hb=05b677fad57427a5639b36a1822c9ebd52cb3339;hp=dee6a557a2f9feb1672892c9a737a594eb3c060e;hpb=b5d7276113c4eaf0dfbb8d12c80c1111d47033cd;p=ghc-hetmet.git diff --git a/rts/Schedule.c b/rts/Schedule.c index dee6a55..cb2f7f3 100644 --- a/rts/Schedule.c +++ b/rts/Schedule.c @@ -2202,6 +2202,9 @@ forkProcess(HsStablePtr *entry ACQUIRE_LOCK(&sched_mutex); for (task = all_tasks; task != NULL; task=task->all_link) { if (task != cap->running_task) { +#if defined(THREADED_RTS) + initMutex(&task->lock); // see #1391 +#endif discardTask(task); } } @@ -2834,7 +2837,7 @@ threadStackOverflow(Capability *cap, StgTSO *tso) "increasing stack size from %ld words to %d.", (long)tso->stack_size, new_stack_size); - dest = (StgTSO *)allocate(new_tso_size); + dest = (StgTSO *)allocateLocal(cap,new_tso_size); TICK_ALLOC_TSO(new_stack_size,0); /* copy the TSO block and the old stack into the new area */