From 048304d347f5d18b60d8b346ff2ad9c6666a9b35 Mon Sep 17 00:00:00 2001 From: simonmar Date: Thu, 19 Aug 2004 11:27:45 +0000 Subject: [PATCH] [project @ 2004-08-19 11:27:45 by simonmar] bugfix: set tso->link = END_TSO_QUEUE before APPEND_TO_RUN_QUEUE(). --- ghc/rts/Schedule.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ghc/rts/Schedule.c b/ghc/rts/Schedule.c index b1b9fda..71c3ec9 100644 --- a/ghc/rts/Schedule.c +++ b/ghc/rts/Schedule.c @@ -2425,7 +2425,7 @@ unblockOneLocked(StgBlockingQueueElement *bqe, StgClosure *node) ASSERT(((StgTSO *)bqe)->why_blocked != NotBlocked); /* if it's a TSO just push it onto the run_queue */ next = bqe->link; - // ((StgTSO *)bqe)->link = END_TSO_QUEUE; // debugging? + ((StgTSO *)bqe)->link = END_TSO_QUEUE; // debugging? APPEND_TO_RUN_QUEUE((StgTSO *)bqe); THREAD_RUNNABLE(); unblockCount(bqe, node); @@ -2470,6 +2470,7 @@ unblockOneLocked(StgTSO *tso) ASSERT(tso->why_blocked != NotBlocked); tso->why_blocked = NotBlocked; next = tso->link; + tso->link = END_TSO_QUEUE; APPEND_TO_RUN_QUEUE(tso); THREAD_RUNNABLE(); IF_DEBUG(scheduler,sched_belch("waking up thread %ld", tso->id)); -- 1.7.10.4