Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Shayne Fletcher
Glasgow Haskell Compiler
Commits
fec3bab8
Commit
fec3bab8
authored
Mar 16, 2006
by
Simon Marlow
Browse files
discardTask(): reset task->tso to avoid confusion later
parent
5638488b
Changes
1
Hide whitespace changes
Inline
Side-by-side
ghc/rts/Task.c
View file @
fec3bab8
...
...
@@ -175,10 +175,15 @@ void
discardTask
(
Task
*
task
)
{
ASSERT_LOCK_HELD
(
&
sched_mutex
);
task
->
stopped
=
rtsTrue
;
task
->
cap
=
NULL
;
task
->
next
=
task_free_list
;
task_free_list
=
task
;
if
(
!
task
->
stopped
)
{
IF_DEBUG
(
scheduler
,
sched_belch
(
"discarding task %p"
,(
void
*
)
task
->
id
));
task
->
cap
=
NULL
;
task
->
tso
=
NULL
;
task
->
stopped
=
rtsTrue
;
tasksRunning
--
;
task
->
next
=
task_free_list
;
task_free_list
=
task
;
}
}
void
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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