X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=rts%2FTimer.c;h=a5d42fbc9d45eca3653b68476aff6e7a48b1f4d7;hb=bb7b45dcf16118fb03bf28aea08a168ac6598a33;hp=9822239b334bf79b147318bdb84e96a64691c37a;hpb=8d71be7cbd079f5eab23484a53a43b59dd0399e5;p=ghc-hetmet.git diff --git a/rts/Timer.c b/rts/Timer.c index 9822239..a5d42fb 100644 --- a/rts/Timer.c +++ b/rts/Timer.c @@ -14,12 +14,13 @@ * on platform-specific services to install and run the timers. * */ + +#include "PosixSource.h" #include "Rts.h" -#include "RtsFlags.h" + +#include "Timer.h" #include "Proftimer.h" -#include "Storage.h" #include "Schedule.h" -#include "Timer.h" #include "Ticker.h" #include "Capability.h" #include "RtsSignals.h" @@ -47,7 +48,7 @@ handle_tick(int unused STG_UNUSED) ticks_to_ctxt_switch--; if (ticks_to_ctxt_switch <= 0) { ticks_to_ctxt_switch = RtsFlags.ConcFlags.ctxtSwitchTicks; - context_switch = 1; /* schedule a context switch */ + setContextSwitches(); /* schedule a context switch */ } } @@ -113,9 +114,9 @@ stopTimer(void) } void -exitTimer(void) +exitTimer (rtsBool wait) { if (RtsFlags.MiscFlags.tickInterval != 0) { - exitTicker(); + exitTicker(wait); } }