From d1910765bed05ab31cf7f5c0d979aca812e94136 Mon Sep 17 00:00:00 2001 From: simonmar Date: Tue, 19 Oct 1999 15:39:08 +0000 Subject: [PATCH] [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. --- ghc/rts/Schedule.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ghc/rts/Schedule.h b/ghc/rts/Schedule.h index 3bc46d5..06ff4cf 100644 --- a/ghc/rts/Schedule.h +++ b/ghc/rts/Schedule.h @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $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 { \ -- 1.7.10.4