diff options
author | Simon Marlow <simonmar@microsoft.com> | 2007-03-02 11:31:04 +0000 |
---|---|---|
committer | Simon Marlow <simonmar@microsoft.com> | 2007-03-02 11:31:04 +0000 |
commit | e30aca19def5c629a8429bd57e56535b7f8f85c8 (patch) | |
tree | 64513fe1bd809cb0e8442df826a03fb73c324103 /rts/Timer.c | |
parent | 090bff7e86dbad7c429532994f3f2fe9d4d8b8ea (diff) | |
download | haskell-e30aca19def5c629a8429bd57e56535b7f8f85c8.tar.gz |
Use timer_create() for the interval timer, if available
This lets the threaded RTS use SIGVTALRM rather than SIGALRM for its
interval timer signal, so the threaded and non-threaded RTS are
compatible. It unfortunately doesn't completely fix #850/#1156, for
that we really have to use a restartable sleep instead of usleep().
Also I cleaned up the timer API a little: instead of returning an
error value that ultimately gets ignored, we now report errors from
system calls and exit.
Diffstat (limited to 'rts/Timer.c')
-rw-r--r-- | rts/Timer.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/rts/Timer.c b/rts/Timer.c index 8088600246..493fe3d35f 100644 --- a/rts/Timer.c +++ b/rts/Timer.c @@ -83,18 +83,18 @@ handle_tick(int unused STG_UNUSED) #endif } -int +void startTimer(void) { #ifdef PROFILING initProfTimer(); #endif - return startTicker(RtsFlags.MiscFlags.tickInterval, handle_tick); + startTicker(RtsFlags.MiscFlags.tickInterval, handle_tick); } -int +void stopTimer(void) { - return stopTicker(); + stopTicker(); } |