Commit d1910765 authored by simonmar's avatar simonmar
Browse files

[project @ 1999-10-19 15:39:08 by simonmar]

ASSERT that the tso link field is empty before pushing it on the end
of a queue.
parent c9cd97a0
/* -----------------------------------------------------------------------------
* $Id: Schedule.h,v 1.7 1999/09/10 11:11:52 simonmar Exp $
* $Id: Schedule.h,v 1.8 1999/10/19 15:39:08 simonmar Exp $
*
* (c) The GHC Team 1998-1999
*
......@@ -47,7 +47,8 @@ extern StgTSO *MainTSO; /* temporary hack */
* NOTE: tso->link should be END_TSO_QUEUE before calling this macro.
*/
#define PUSH_ON_RUN_QUEUE(tso) \
if (run_queue_hd == END_TSO_QUEUE) { \
ASSERT(tso->link == END_TSO_QUEUE); \
if (run_queue_hd == END_TSO_QUEUE) { \
run_queue_hd = tso; \
} else { \
run_queue_tl->link = tso; \
......@@ -55,6 +56,7 @@ extern StgTSO *MainTSO; /* temporary hack */
run_queue_tl = tso;
#define PUSH_ON_BLOCKED_QUEUE(tso) \
ASSERT(tso->link == END_TSO_QUEUE); \
if (blocked_queue_hd == END_TSO_QUEUE) { \
blocked_queue_hd = tso; \
} else { \
......
Supports Markdown
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