From e558ea934a4ba7bca5888f3223cc4aaa0fcd7b0e Mon Sep 17 00:00:00 2001 From: simonmar Date: Mon, 12 Feb 2001 13:14:13 +0000 Subject: [PATCH] [project @ 2001-02-12 13:14:13 by simonmar] check for ThreadRelocated when unblocking a thread blocked on delivering an async exception. --- ghc/rts/Schedule.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/ghc/rts/Schedule.c b/ghc/rts/Schedule.c index 5e58d86..18efd8e 100644 --- a/ghc/rts/Schedule.c +++ b/ghc/rts/Schedule.c @@ -1,5 +1,5 @@ /* --------------------------------------------------------------------------- - * $Id: Schedule.c,v 1.90 2001/02/11 17:51:08 simonmar Exp $ + * $Id: Schedule.c,v 1.91 2001/02/12 13:14:13 simonmar Exp $ * * (c) The GHC Team, 1998-2000 * @@ -2490,6 +2490,12 @@ unblockThread(StgTSO *tso) StgTSO *target = tso->block_info.tso; ASSERT(get_itbl(target)->type == TSO); + + if (target->what_next == ThreadRelocated) { + target = target->link; + ASSERT(get_itbl(target)->type == TSO); + } + ASSERT(target->blocked_exceptions != NULL); last = (StgBlockingQueueElement **)&target->blocked_exceptions; @@ -2610,6 +2616,12 @@ unblockThread(StgTSO *tso) StgTSO *target = tso->block_info.tso; ASSERT(get_itbl(target)->type == TSO); + + while (target->what_next == ThreadRelocated) { + target = target->link; + ASSERT(get_itbl(target)->type == TSO); + } + ASSERT(target->blocked_exceptions != NULL); last = &target->blocked_exceptions; -- 1.7.10.4