X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Frts%2Fposix%2FItimer.c;fp=ghc%2Frts%2FItimer.c;h=06d0e6c82a6954ca1d6744704ec6fc6ceb66ba39;hb=03a9ff01812afc81eb5236fd3063cbec44cf469e;hp=d4592c75f9f5af0b813f8ad36c9482529e8d835e;hpb=63e8af080a7e779a48e812e6caa9ea519b046260;p=ghc-hetmet.git diff --git a/ghc/rts/Itimer.c b/ghc/rts/posix/Itimer.c similarity index 96% rename from ghc/rts/Itimer.c rename to ghc/rts/posix/Itimer.c index d4592c7..06d0e6c 100644 --- a/ghc/rts/Itimer.c +++ b/ghc/rts/posix/Itimer.c @@ -19,9 +19,11 @@ #include "Rts.h" #include "RtsFlags.h" #include "Timer.h" -#include "Itimer.h" +#include "Ticker.h" +#include "posix/Itimer.h" #include "Proftimer.h" #include "Schedule.h" +#include "posix/Select.h" /* As recommended in the autoconf manual */ # ifdef TIME_WITH_SYS_TIME @@ -65,7 +67,7 @@ * * For now, we're using (1), but this needs a better solution. --SDM */ -#ifdef RTS_SUPPORTS_THREADS +#ifdef THREADED_RTS #define ITIMER_FLAVOUR ITIMER_REAL #define ITIMER_SIGNAL SIGALRM #else @@ -98,7 +100,9 @@ startTicker(nat ms, TickProc handle_tick) install_vtalrm_handler(handle_tick); +#if !defined(THREADED_RTS) timestamp = getourtimeofday(); +#endif it.it_value.tv_sec = ms / 1000; it.it_value.tv_usec = 1000 * (ms - (1000 * it.it_value.tv_sec)); @@ -132,7 +136,9 @@ startTicker(nat ms) struct itimerspec it; timer_t tid; +#if !defined(THREADED_RTS) timestamp = getourtimeofday(); +#endif se.sigev_notify = SIGEV_SIGNAL; se.sigev_signo = ITIMER_SIGNAL; @@ -153,7 +159,9 @@ stopTicker() struct itimerspec it; timer_t tid; +#if !defined(THREADED_RTS) timestamp = getourtimeofday(); +#endif se.sigev_notify = SIGEV_SIGNAL; se.sigev_signo = ITIMER_SIGNAL;