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:
ce7bf18
)
fix bug in discardTasksExcept() that broke forkProcess
author
Simon Marlow
<marlowsd@gmail.com>
Thu, 11 Mar 2010 09:36:32 +0000
(09:36 +0000)
committer
Simon Marlow
<marlowsd@gmail.com>
Thu, 11 Mar 2010 09:36:32 +0000
(09:36 +0000)
rts/Task.c
patch
|
blob
|
history
diff --git
a/rts/Task.c
b/rts/Task.c
index
2921e9e
..
e2f363b
100644
(file)
--- a/
rts/Task.c
+++ b/
rts/Task.c
@@
-280,11
+280,12
@@
boundTaskExiting (Task *task)
void
discardTasksExcept (Task *keep)
{
- Task *task;
+ Task *task, *next;
// Wipe the task list, except the current Task.
ACQUIRE_LOCK(&sched_mutex);
- for (task = all_tasks; task != NULL; task=task->all_link) {
+ for (task = all_tasks; task != NULL; task=next) {
+ next = task->all_link;
if (task != keep) {
debugTrace(DEBUG_sched, "discarding task %ld", (long)TASK_ID(task));
freeTask(task);