/* -----------------------------------------------------------------------------
- * $Id: RtsStartup.c,v 1.16 1999/07/03 18:39:40 sof Exp $
+ * $Id: RtsStartup.c,v 1.19 1999/09/13 11:02:08 sof 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"
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
void
shutdownHaskellAndExit(int n)
{
+ OnExitHook();
shutdownHaskell();
stg_exit(n);
}
/* 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
/*
- * called from STG-land to exit the program cleanly
+ * called from STG-land to exit the program
*/
void
#ifdef PAR
par_exit(n);
#else
- OnExitHook();
exit(n);
#endif
}
+