[project @ 2000-08-03 11:28:35 by simonmar]
[ghc-hetmet.git] / ghc / rts / Itimer.h
1 /* -----------------------------------------------------------------------------
2  * $Id: Itimer.h,v 1.6 2000/08/03 11:28:35 simonmar Exp $
3  *
4  * (c) The GHC Team 1998-1999
5  *
6  * Interval timer for profiling and pre-emptive scheduling.
7  *
8  * ---------------------------------------------------------------------------*/
9
10 # define TICK_FREQUENCY   50                      /* ticks per second */
11 # define TICK_MILLISECS   (1000/TICK_FREQUENCY)   /* ms per tick */
12
13 /* Context switch timing constants. Context switches happen after a
14  * whole number of ticks, the default being every tick.
15  */
16 #define CS_MIN_MILLISECS TICK_MILLISECS       /* milliseconds per slice */
17  
18 extern rtsBool do_prof_ticks;   /* profiling ticks on/off */
19
20 nat  initialize_virtual_timer  ( nat ms );
21 int  install_vtalrm_handler    ( void );
22 void block_vtalrm_signal       ( void );
23 void unblock_vtalrm_signal     ( void );
24 unsigned int getourtimeofday   ( void );