summaryrefslogtreecommitdiff
path: root/rts/Task.c
diff options
context:
space:
mode:
authorEsa Ilari Vuokko <ei@vuokko.info>2006-08-23 19:46:04 +0000
committerEsa Ilari Vuokko <ei@vuokko.info>2006-08-23 19:46:04 +0000
commit88b35c172f9434fd98b700f706074d142914a8bb (patch)
tree69dad172652bfbb112ab2ef8afc964c0112b662b /rts/Task.c
parent52589e05f86d593bc3e6ea3f1a0b8f6ceae94fe6 (diff)
downloadhaskell-88b35c172f9434fd98b700f706074d142914a8bb.tar.gz
Add closeMutex and use it on clean up
Diffstat (limited to 'rts/Task.c')
-rw-r--r--rts/Task.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/rts/Task.c b/rts/Task.c
index 3be5b283d7..a03ed87651 100644
--- a/rts/Task.c
+++ b/rts/Task.c
@@ -77,6 +77,10 @@ stopTaskManager (void)
for (task = task_free_list; task != NULL; task = next) {
next = task->next;
stgFree(task);
+#if defined(THREADED_RTS)
+ closeCondition(&task->cond);
+ closeMutex(&task->lock);
+#endif
}
task_free_list = NULL;
RELEASE_LOCK(&sched_mutex);