From: simonmar Date: Thu, 27 Oct 2005 15:17:11 +0000 (+0000) Subject: [project @ 2005-10-27 15:17:11 by simonmar] X-Git-Tag: Initial_conversion_from_CVS_complete~111 X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=commitdiff_plain;h=0201984165ba94315a510dd4388f7b46623d95f8 [project @ 2005-10-27 15:17:11 by simonmar] unpark_tso: call unblockOne() instead of doing the job inline. This properly migrates the thread, setting its task to point back to the right capability, if necessary. --- diff --git a/ghc/rts/STM.c b/ghc/rts/STM.c index e92763f..282ab74 100644 --- a/ghc/rts/STM.c +++ b/ghc/rts/STM.c @@ -328,8 +328,7 @@ static void unpark_tso(Capability *cap, StgTSO *tso) { // if it decides to do so when it is scheduled. if (tso -> why_blocked == BlockedOnSTM) { TRACE("unpark_tso on tso=%p\n", tso); - tso -> why_blocked = NotBlocked; - pushOnRunQueue(cap,tso); + unblockOne(cap,tso); } else { TRACE("spurious unpark_tso on tso=%p\n", tso); }