diff options
author | Simon Marlow <marlowsd@gmail.com> | 2010-04-06 09:14:53 +0000 |
---|---|---|
committer | Simon Marlow <marlowsd@gmail.com> | 2010-04-06 09:14:53 +0000 |
commit | 9dd9e3c4cc170185e5bbdb7b49eb21c553b9b4fc (patch) | |
tree | 64ae99024d1281e0cffb53ee07375e749b7d3d9a /rts/Schedule.h | |
parent | 20fcaaba537c370bc7ccefaf5e21453ac09664b6 (diff) | |
download | haskell-9dd9e3c4cc170185e5bbdb7b49eb21c553b9b4fc.tar.gz |
Fix bug in popRunQueue
Diffstat (limited to 'rts/Schedule.h')
-rw-r--r-- | rts/Schedule.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/rts/Schedule.h b/rts/Schedule.h index 1e786ce690..7760e364bd 100644 --- a/rts/Schedule.h +++ b/rts/Schedule.h @@ -155,7 +155,9 @@ popRunQueue (Capability *cap) StgTSO *t = cap->run_queue_hd; ASSERT(t != END_TSO_QUEUE); cap->run_queue_hd = t->_link; - cap->run_queue_hd->block_info.prev = END_TSO_QUEUE; + if (t->_link != END_TSO_QUEUE) { + t->_link->block_info.prev = END_TSO_QUEUE; + } t->_link = END_TSO_QUEUE; // no write barrier req'd if (cap->run_queue_hd == END_TSO_QUEUE) { cap->run_queue_tl = END_TSO_QUEUE; |