X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Frts%2FStgStartup.cmm;fp=ghc%2Frts%2FStgStartup.cmm;h=ece080b8b755b8eec72d470b5f1f678c6e9a6667;hb=c77201452748a299caa3c0254bd7a76ba0c64bee;hp=d727cb573f0ddb2c41856191ae1c8b9fda0975f2;hpb=86024676b79116949cb2ad4d7843f3b4c1fba088;p=ghc-hetmet.git diff --git a/ghc/rts/StgStartup.cmm b/ghc/rts/StgStartup.cmm index d727cb5..ece080b 100644 --- a/ghc/rts/StgStartup.cmm +++ b/ghc/rts/StgStartup.cmm @@ -121,6 +121,16 @@ stg_returnToSched jump StgReturn; } +// A variant of stg_returntToSched that doesn't call threadPaused() on the +// current thread. This is used for switching from compiled execution to the +// interpreter, where calling threadPaused() on every switch would be too +// expensive. +stg_returnToSchedNotPaused +{ + SAVE_THREAD_STATE(); + jump StgReturn; +} + // A variant of stg_returnToSched, but instead of returning directly to the // scheduler, we jump to the code fragment pointed to by R2. This lets us // perform some final actions after making the thread safe, such as unlocking