projects
/
ghc-hetmet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
48aefd9
)
Free all tasks on exit, not just those on the task_free_list
author
Ian Lynagh
<igloo@earth.li>
Fri, 15 Dec 2006 17:26:17 +0000
(17:26 +0000)
committer
Ian Lynagh
<igloo@earth.li>
Fri, 15 Dec 2006 17:26:17 +0000
(17:26 +0000)
rts/Task.c
patch
|
blob
|
history
diff --git
a/rts/Task.c
b/rts/Task.c
index
9aa43c0
..
4a63084
100644
(file)
--- a/
rts/Task.c
+++ b/
rts/Task.c
@@
-83,14
+83,15
@@
freeTaskManager (void)
debugTrace(DEBUG_sched, "freeing task manager");
ACQUIRE_LOCK(&sched_mutex);
debugTrace(DEBUG_sched, "freeing task manager");
ACQUIRE_LOCK(&sched_mutex);
- for (task = task_free_list; task != NULL; task = next) {
+ for (task = all_tasks; task != NULL; task = next) {
#if defined(THREADED_RTS)
closeCondition(&task->cond);
closeMutex(&task->lock);
#endif
#if defined(THREADED_RTS)
closeCondition(&task->cond);
closeMutex(&task->lock);
#endif
- next = task->next;
+ next = task->all_link;
stgFree(task);
}
stgFree(task);
}
+ all_tasks = NULL;
task_free_list = NULL;
RELEASE_LOCK(&sched_mutex);
}
task_free_list = NULL;
RELEASE_LOCK(&sched_mutex);
}