X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Frts%2FSelect.c;h=04087721a3511a896fd859228758b9b5ff9580f7;hb=2374f2fd94d438ae941d81bc92d0d10b1fc874dc;hp=644bb41035f18ce2cd82e858c5a7b8f97f4ee958;hpb=6339f4b081ea645bbba52d2c8a2dd38713b9ef2a;p=ghc-hetmet.git diff --git a/ghc/rts/Select.c b/ghc/rts/Select.c index 644bb41..0408772 100644 --- a/ghc/rts/Select.c +++ b/ghc/rts/Select.c @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: Select.c,v 1.15 2001/02/27 12:43:45 rrt Exp $ + * $Id: Select.c,v 1.19 2001/11/13 13:38:02 simonmar Exp $ * * (c) The GHC Team 1995-1999 * @@ -8,7 +8,7 @@ * ---------------------------------------------------------------------------*/ /* we're outside the realms of POSIX here... */ -#define NON_POSIX_SOURCE +/* #include "PosixSource.h" */ #include "Rts.h" #include "Schedule.h" @@ -26,18 +26,12 @@ # endif # ifdef mingw32_TARGET_OS -# include +# include # endif /* last timestamp */ nat timestamp = 0; -/* keep track of the number of ticks since we last called - * gettimeofday(), to avoid having to call it every time we need - * a timestamp. - */ -nat ticks_since_timestamp = 0; - /* There's a clever trick here to avoid problems when the time wraps * around. Since our maximum delay is smaller than 31 bits of ticks * (it's actually 31 bits of microseconds), we can safely check @@ -114,7 +108,6 @@ awaitEvent(rtsBool wait) do { ticks = timestamp = getourtimeofday(); - ticks_since_timestamp = 0; if (wakeUpSleepingThreads(ticks)) { return; } @@ -201,7 +194,7 @@ awaitEvent(rtsBool wait) */ if (signals_pending()) { RELEASE_LOCK(&sched_mutex); /* ToDo: kill */ - start_signal_handlers(); + startSignalHandlers(); ACQUIRE_LOCK(&sched_mutex); return; /* still hold the lock */ }