From: Ian Lynagh Date: Fri, 15 Dec 2006 16:42:10 +0000 (+0000) Subject: Put the task on the free list in workerTaskStop X-Git-Tag: 2006-12-16~3 X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=commitdiff_plain;h=5d48ad2707548f077e2856b41c4864f6a1efb3cc Put the task on the free list in workerTaskStop --- diff --git a/rts/Task.c b/rts/Task.c index 551f137..9aa43c0 100644 --- a/rts/Task.c +++ b/rts/Task.c @@ -251,6 +251,11 @@ workerTaskStop (Task *task) taskTimeStamp(task); task->stopped = rtsTrue; tasksRunning--; + + ACQUIRE_LOCK(&sched_mutex); + task->next = task_free_list; + task_free_list = task; + RELEASE_LOCK(&sched_mutex); } void