[project @ 1999-09-16 08:35:38 by sof]
[ghc-hetmet.git] / ghc / rts / RtsStartup.c
index d87f188..4c281a6 100644 (file)
@@ -1,5 +1,5 @@
 /* -----------------------------------------------------------------------------
- * $Id: RtsStartup.c,v 1.17 1999/07/06 15:33:23 simonmar Exp $
+ * $Id: RtsStartup.c,v 1.20 1999/09/15 13:45:20 simonmar Exp $
  *
  * (c) The GHC Team, 1998-1999
  *
 #include "StablePriv.h" /* initStablePtrTable */
 #include "Schedule.h"   /* initScheduler */
 #include "Stats.h"      /* initStats */
+#include "Signals.h"
+#include "Itimer.h"
 #include "Weak.h"
 #include "Ticky.h"
 
 #if defined(PROFILING)
 # include "ProfRts.h"
-#elif defined(DEBUG)
-# include "DebugProf.h"
+# include "ProfHeap.h"
 #endif
 
 #ifdef PAR
@@ -110,13 +111,18 @@ startupHaskell(int argc, char *argv[])
     initProfiling();
 #endif
 
+    /* start the ticker */
+    install_vtalrm_handler();
+    initialize_virtual_timer(TICK_MILLISECS);
+
     /* Initialise the scheduler */
     initScheduler();
 
     /* Initialise the stats department */
     initStats();
 
-#if 0
+    /* Initialise the user signal handler set */
+#if !defined(mingw32_TARGET_OS) && !defined(PAR)
     initUserSignals();
 #endif
  
@@ -171,6 +177,9 @@ shutdownHaskell(void)
   /* clean up things from the storage manager's point of view */
   exitStorage();
 
+  /* stop the ticker */
+  initialize_virtual_timer(0);
+
 #if defined(PROFILING) || defined(DEBUG)
   endProfiling();
 #endif