X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Frts%2FItimer.h;h=3e41e49a7b95f63279263affa22a244c77d9ad0e;hb=89c285c4ab6ccffec82256bd2699e77f7596e3b1;hp=0876e8445353ad21fbf99a65265c067e93f25c96;hpb=7f309f1c021e7583f724cce599ce2dd3c439361b;p=ghc-hetmet.git diff --git a/ghc/rts/Itimer.h b/ghc/rts/Itimer.h index 0876e84..3e41e49 100644 --- a/ghc/rts/Itimer.h +++ b/ghc/rts/Itimer.h @@ -1,15 +1,22 @@ /* ----------------------------------------------------------------------------- - * $Id: Itimer.h,v 1.3 1999/02/05 16:02:44 simonm Exp $ + * $Id: Itimer.h,v 1.10 2001/11/27 01:51:23 sof Exp $ * - * (c) The GHC Team 1998-1999 + * (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 );