#include "RtsTypeable.h"
#include "Stable.h"
#include "Hpc.h"
+#include "FileLock.h"
#if defined(RTS_GTK_FRONTPANEL)
#include "FrontPanel.h"
/* initialise the shared Typeable store */
initTypeableStore();
+ /* initialise file locking, if necessary */
+#if !defined(mingw32_HOST_OS)
+ initFileLocking();
+#endif
+
#if defined(DEBUG)
/* initialise thread label table (tso->char*) */
initThreadLabelTable();
initProfiling1();
/* start the virtual timer 'subsystem'. */
+ initTimer();
startTimer();
/* Initialise the stats department */
x86_init_fpu();
#endif
-#if defined(THREADED_RTS)
- ioManagerStart();
-#endif
-
/* Record initialization times */
stat_endInit();
}
// This must be done after module initialisation.
// ToDo: make this work in the presence of multiple hs_add_root()s.
initProfiling2();
+
+ // ditto.
+#if defined(THREADED_RTS)
+ ioManagerStart();
+#endif
}
/* ----------------------------------------------------------------------------
/* stop the ticker */
stopTimer();
+ exitTimer();
/* reset the standard file descriptors to blocking mode */
resetNonBlockingFd(0);
/* free shared Typeable store */
exitTypeableStore();
+ /* free file locking tables, if necessary */
+#if !defined(mingw32_HOST_OS)
+ freeFileLocking();
+#endif
+
/* free the stable pointer table */
exitStablePtrTable();
reportCCSProfiling();
#endif
- freeProfiling1();
-
endProfiling();
+ freeProfiling1();
#ifdef PROFILING
// Originally, this was in report_ccs_profiling(). Now, retainer