X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Frts%2FItimer.h;h=3e41e49a7b95f63279263affa22a244c77d9ad0e;hb=e0b2097136f30331bae67cb01e66bba749d272c1;hp=e415074d867747db63c71d18275f228e7731bd76;hpb=438596897ebbe25a07e1c82085cfbc5bdb00f09e;p=ghc-hetmet.git diff --git a/ghc/rts/Itimer.h b/ghc/rts/Itimer.h index e415074..3e41e49 100644 --- a/ghc/rts/Itimer.h +++ b/ghc/rts/Itimer.h @@ -1,15 +1,22 @@ /* ----------------------------------------------------------------------------- - * $Id: Itimer.h,v 1.2 1998/12/02 13:28:28 simonm Exp $ + * $Id: Itimer.h,v 1.10 2001/11/27 01:51:23 sof Exp $ * - * (c) The GHC Team 1998 + * (c) The GHC Team 1998-2001 * * Interval timer for profiling and pre-emptive scheduling. * * ---------------------------------------------------------------------------*/ -nat initialize_virtual_timer ( nat ms ); -int install_vtalrm_handler ( void (*handler)(int) ); +# define TICK_FREQUENCY 50 /* ticks per second */ +# define TICK_MILLISECS (1000/TICK_FREQUENCY) /* ms per tick */ + +/* Context switch timing constants. Context switches happen after a + * whole number of ticks, the default being every tick. + */ +#define CS_MIN_MILLISECS TICK_MILLISECS /* milliseconds per slice */ + +int startVirtTimer( nat ms ); +int stopVirtTimer ( void ); void block_vtalrm_signal ( void ); void unblock_vtalrm_signal ( void ); - - +unsigned int getourtimeofday ( void );