From: simonmar Date: Mon, 12 Feb 2001 13:14:13 +0000 (+0000) Subject: [project @ 2001-02-12 13:14:13 by simonmar] X-Git-Tag: Approximately_9120_patches~2667 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=e558ea934a4ba7bca5888f3223cc4aaa0fcd7b0e;p=ghc-hetmet.git [project @ 2001-02-12 13:14:13 by simonmar] check for ThreadRelocated when unblocking a thread blocked on delivering an async exception. --- 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;