Commit 3d7ffacd authored by Simon Marlow's avatar Simon Marlow

removeThreadFromQueue: stub out the link field before returning (#4813)

parent 42c62ec7
......@@ -163,9 +163,11 @@ removeThreadFromQueue (Capability *cap, StgTSO **queue, StgTSO *tso)
if (t == tso) {
if (prev) {
setTSOLink(cap,prev,t->_link);
t->_link = END_TSO_QUEUE;
return rtsFalse;
} else {
*queue = t->_link;
t->_link = END_TSO_QUEUE;
return rtsTrue;
}
}
......@@ -190,7 +192,8 @@ removeThreadFromDeQueue (Capability *cap,
*head = t->_link;
flag = rtsTrue;
}
if (*tail == tso) {
t->_link = END_TSO_QUEUE;
if (*tail == tso) {
if (prev) {
*tail = prev;
} else {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment