X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=rts%2FTask.c;h=551f13777a645eea4f9d8023333a88db4e682754;hb=e119cde9caf1f2acbde7ff53feebdc27d6c35f8d;hp=11307a7703bd60d2ce5edd73dce3baaf4aea7ca1;hpb=3c21579aa6365c053baf82680882a01949b1e902;p=ghc-hetmet.git diff --git a/rts/Task.c b/rts/Task.c index 11307a7..551f137 100644 --- a/rts/Task.c +++ b/rts/Task.c @@ -15,6 +15,7 @@ #include "Capability.h" #include "Stats.h" #include "RtsFlags.h" +#include "Storage.h" #include "Schedule.h" #include "Hash.h" #include "Trace.h" @@ -67,19 +68,27 @@ initTaskManager (void) void stopTaskManager (void) { - Task *task, *next; - debugTrace(DEBUG_sched, "stopping task manager, %d tasks still running", tasksRunning); + /* nothing to do */ +} + + +void +freeTaskManager (void) +{ + Task *task, *next; + + debugTrace(DEBUG_sched, "freeing task manager"); ACQUIRE_LOCK(&sched_mutex); for (task = task_free_list; task != NULL; task = next) { - next = task->next; #if defined(THREADED_RTS) closeCondition(&task->cond); closeMutex(&task->lock); #endif + next = task->next; stgFree(task); } task_free_list = NULL;