X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=rts%2FTimer.c;h=8088600246e761c591829979ed2635cba437b242;hb=5f8b35ad729740cab1cb8c884deb405dcc758683;hp=b4f5f8f130bebb752fdc9a87813b5232569868eb;hpb=7434fb5be86c7cc59c520dc07dc96b27b4fb1406;p=ghc-hetmet.git diff --git a/rts/Timer.c b/rts/Timer.c index b4f5f8f..8088600 100644 --- a/rts/Timer.c +++ b/rts/Timer.c @@ -17,6 +17,7 @@ #include "Rts.h" #include "RtsFlags.h" #include "Proftimer.h" +#include "Storage.h" #include "Schedule.h" #include "Timer.h" #include "Ticker.h" @@ -54,26 +55,27 @@ handle_tick(int unused STG_UNUSED) #if defined(THREADED_RTS) /* - * If we've been inactive for idleGCDelayTicks (set by +RTS + * If we've been inactive for idleGCDelayTime (set by +RTS * -I), tell the scheduler to wake up and do a GC, to check * for threads that are deadlocked. */ switch (recent_activity) { case ACTIVITY_YES: recent_activity = ACTIVITY_MAYBE_NO; - ticks_to_gc = RtsFlags.GcFlags.idleGCDelayTicks; + ticks_to_gc = RtsFlags.GcFlags.idleGCDelayTime / + RtsFlags.MiscFlags.tickInterval; break; case ACTIVITY_MAYBE_NO: if (ticks_to_gc == 0) break; /* 0 ==> no idle GC */ ticks_to_gc--; if (ticks_to_gc == 0) { - ticks_to_gc = RtsFlags.GcFlags.idleGCDelayTicks; + ticks_to_gc = RtsFlags.GcFlags.idleGCDelayTime / + RtsFlags.MiscFlags.tickInterval; recent_activity = ACTIVITY_INACTIVE; blackholes_need_checking = rtsTrue; /* hack: re-use the blackholes_need_checking flag */ - + wakeUpRts(); } - wakeUpRts(); break; default: break; @@ -82,17 +84,17 @@ handle_tick(int unused STG_UNUSED) } int -startTimer(nat ms) +startTimer(void) { #ifdef PROFILING initProfTimer(); #endif - return startTicker(ms, handle_tick); + return startTicker(RtsFlags.MiscFlags.tickInterval, handle_tick); } int -stopTimer() +stopTimer(void) { return stopTicker(); }