X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Frts%2FSchedule.c;h=e614ae77f37bff47d4116243dbf24cd378d5c81d;hb=bd2fb1c5eacc886737afd72cc889386e00ed5d23;hp=fb6749a48e6282e3af593cf8a79972908beba161;hpb=14fef21dcaa7169ea4272f4729ad33f647d62fa3;p=ghc-hetmet.git diff --git a/ghc/rts/Schedule.c b/ghc/rts/Schedule.c index fb6749a..e614ae7 100644 --- a/ghc/rts/Schedule.c +++ b/ghc/rts/Schedule.c @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: Schedule.c,v 1.29 1999/11/02 17:19:16 simonmar Exp $ + * $Id: Schedule.c,v 1.30 1999/11/08 15:30:39 sewardj Exp $ * * (c) The GHC Team, 1998-1999 * @@ -149,7 +149,7 @@ void addToBlockedQueue ( StgTSO *tso ); static void schedule ( void ); static void initThread ( StgTSO *tso, nat stack_size ); -static void interruptStgRts ( void ); + void interruptStgRts ( void ); #ifdef SMP pthread_mutex_t sched_mutex = PTHREAD_MUTEX_INITIALIZER; @@ -278,17 +278,13 @@ schedule( void ) break; case ThreadEnterHugs: #ifdef INTERPRETER - { - IF_DEBUG(scheduler,belch("schedule: entering Hugs")); - LoadThreadState(); - /* CHECK_SENSIBLE_REGS(); */ - { - StgClosure* c = (StgClosure *)Sp[0]; - Sp += 1; - ret = enter(c); - } - SaveThreadState(); - break; + { + StgClosure* c; + IF_DEBUG(scheduler,belch("schedule: entering Hugs")); + c = (StgClosure *)(cap->rCurrentTSO->sp[0]); + cap->rCurrentTSO->sp += 1; + ret = enter(cap,c); + break; } #else barf("Panic: entered a BCO but no bytecode interpreter in this build");