FIX #1623: disable the timer signal when the system is idle (threaded RTS only)
authorSimon Marlow <simonmar@microsoft.com>
Mon, 3 Sep 2007 13:25:23 +0000 (13:25 +0000)
committerSimon Marlow <simonmar@microsoft.com>
Mon, 3 Sep 2007 13:25:23 +0000 (13:25 +0000)
commit8d71be7cbd079f5eab23484a53a43b59dd0399e5
tree8772a7455fbba0e62f11b858dfecded04f68094e
parent37e27d92a0fc14105e4533514c3995fccd6da9fe
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.
rts/RtsStartup.c
rts/Schedule.c
rts/Ticker.h
rts/Timer.c
rts/Timer.h
rts/posix/Itimer.c
rts/win32/Ticker.c