From 0201984165ba94315a510dd4388f7b46623d95f8 Mon Sep 17 00:00:00 2001 From: simonmar Date: Thu, 27 Oct 2005 15:17:11 +0000 Subject: [PATCH] [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. --- ghc/rts/STM.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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); } -- 1.7.10.4