summaryrefslogtreecommitdiff
path: root/rts/Timer.h
diff options
context:
space:
mode:
authorSimon Marlow <simonmar@microsoft.com>2007-09-03 13:25:23 +0000
committerSimon Marlow <simonmar@microsoft.com>2007-09-03 13:25:23 +0000
commit8d71be7cbd079f5eab23484a53a43b59dd0399e5 (patch)
tree8772a7455fbba0e62f11b858dfecded04f68094e /rts/Timer.h
parent37e27d92a0fc14105e4533514c3995fccd6da9fe (diff)
downloadhaskell-8d71be7cbd079f5eab23484a53a43b59dd0399e5.tar.gz
FIX #1623: disable the timer signal when the system is idle (threaded RTS only)
Having a timer signal go off regularly is bad for power consumption, and generally bad practice anyway (it means the app cannot be completely swapped out, for example). Fortunately the threaded RTS already had a way to detect when the system was idle, so that it can trigger a GC and thereby find deadlocks. After performing the GC, we now turn off timer signals, and re-enable them again just before running any Haskell code.
Diffstat (limited to 'rts/Timer.h')
-rw-r--r--rts/Timer.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/rts/Timer.h b/rts/Timer.h
index 6d3c4150b0..59b695cac2 100644
--- a/rts/Timer.h
+++ b/rts/Timer.h
@@ -2,16 +2,16 @@
*
* (c) The GHC Team, 1995-2006
*
- * Interval timer service for profiling and pre-emptive scheduling.
+ * Interface to the RTS timer signal (uses OS-dependent Ticker.h underneath)
*
* ---------------------------------------------------------------------------*/
#ifndef TIMER_H
#define TIMER_H
-typedef void (*TickProc)(int);
-
+extern void initTimer(void);
extern void startTimer(void);
extern void stopTimer(void);
+extern void exitTimer(void);
#endif /* TIMER_H */