[commit: ghc] ghc-lwc2: Removed unnecessary branch from unblock thread code (a774fb7)

Sivaramakrishnan Krishnamoorthy Chandrasekaran t-sichan at microsoft.com
Wed May 8 07:50:33 CEST 2013


Repository : http://darcs.haskell.org/ghc.git/

On branch  : ghc-lwc2

https://github.com/ghc/ghc/commit/a774fb71122da9e787e1ecf4e4d32876a2d36266

>---------------------------------------------------------------

commit a774fb71122da9e787e1ecf4e4d32876a2d36266
Author: KC Sivaramakrishnan <chandras at cs.purdue.edu>
Date:   Mon May 6 16:57:34 2013 -0400

    Removed unnecessary branch from unblock thread code

>---------------------------------------------------------------

 rts/Threads.c | 12 +-----------
 1 file changed, 1 insertion(+), 11 deletions(-)

diff --git a/rts/Threads.c b/rts/Threads.c
index 22b3032..a6a49e7 100644
--- a/rts/Threads.c
+++ b/rts/Threads.c
@@ -334,10 +334,7 @@ tryWakeupThread (Capability *cap, StgTSO *tso)
         goto unblock2;
 
     case ThreadMigrating:
-      if (hasHaskellScheduler (tso))
-        goto unblock1;
-      else
-        goto unblock2;
+      goto unblock2;
 
     case BlockedInHaskell:
     case Yielded:
@@ -347,13 +344,6 @@ tryWakeupThread (Capability *cap, StgTSO *tso)
   }
 
 unblock1:
-  if (tso->is_upcall_thread) {
-  /* XXX KC -- upcall threads needs to be appended to the run queue and would
-   * not have an attached upcall, which would make getResumeThreadUpcall fail.
-   * But is this correct? */
-    barf ("This branch is not expected to be taken?");
-    goto unblock2;
-  }
   tso->why_blocked = Yielded;
   pushUpcallReturning (cap, getResumeThreadUpcall (cap, tso));
   return;





More information about the ghc-commits mailing list