Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
jberryman
GHC
Commits
12cfec94
Commit
12cfec94
authored
Mar 11, 2010
by
Simon Marlow
Browse files
fix bug in discardTasksExcept() that broke forkProcess
parent
ce7bf183
Changes
1
Hide whitespace changes
Inline
Side-by-side
rts/Task.c
View file @
12cfec94
...
...
@@ -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
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment