projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
(F)SLIT -> (f)sLit in ClosureInfo
[ghc-hetmet.git]
/
rts
/
RtsStartup.c
diff --git
a/rts/RtsStartup.c
b/rts/RtsStartup.c
index
4f5b1c7
..
4f42823
100644
(file)
--- a/
rts/RtsStartup.c
+++ b/
rts/RtsStartup.c
@@
-33,6
+33,7
@@
#include "RtsTypeable.h"
#include "Stable.h"
#include "Hpc.h"
#include "RtsTypeable.h"
#include "Stable.h"
#include "Hpc.h"
+#include "FileLock.h"
#if defined(RTS_GTK_FRONTPANEL)
#include "FrontPanel.h"
#if defined(RTS_GTK_FRONTPANEL)
#include "FrontPanel.h"
@@
-238,6
+239,11
@@
hs_init(int *argc, char **argv[])
/* initialise the shared Typeable store */
initTypeableStore();
/* 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();
#if defined(DEBUG)
/* initialise thread label table (tso->char*) */
initThreadLabelTable();
@@
-246,6
+252,7
@@
hs_init(int *argc, char **argv[])
initProfiling1();
/* start the virtual timer 'subsystem'. */
initProfiling1();
/* start the virtual timer 'subsystem'. */
+ initTimer();
startTimer();
/* Initialise the stats department */
startTimer();
/* Initialise the stats department */
@@
-274,10
+281,6
@@
hs_init(int *argc, char **argv[])
x86_init_fpu();
#endif
x86_init_fpu();
#endif
-#if defined(THREADED_RTS)
- ioManagerStart();
-#endif
-
/* Record initialization times */
stat_endInit();
}
/* Record initialization times */
stat_endInit();
}
@@
-353,6
+356,11
@@
hs_add_root(void (*init_root)(void))
// This must be done after module initialisation.
// ToDo: make this work in the presence of multiple hs_add_root()s.
initProfiling2();
// 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
}
/* ----------------------------------------------------------------------------
}
/* ----------------------------------------------------------------------------
@@
-409,6
+417,7
@@
hs_exit_(rtsBool wait_foreign)
/* stop the ticker */
stopTimer();
/* stop the ticker */
stopTimer();
+ exitTimer();
/* reset the standard file descriptors to blocking mode */
resetNonBlockingFd(0);
/* reset the standard file descriptors to blocking mode */
resetNonBlockingFd(0);
@@
-460,11
+469,14
@@
hs_exit_(rtsBool wait_foreign)
/* free shared Typeable store */
exitTypeableStore();
/* free shared Typeable store */
exitTypeableStore();
+ /* free file locking tables, if necessary */
+#if !defined(mingw32_HOST_OS)
+ freeFileLocking();
+#endif
+
/* free the stable pointer table */
exitStablePtrTable();
/* free the stable pointer table */
exitStablePtrTable();
- freeProfiling1();
-
#if defined(DEBUG)
/* free the thread label table */
freeThreadLabelTable();
#if defined(DEBUG)
/* free the thread label table */
freeThreadLabelTable();
@@
-481,6
+493,7
@@
hs_exit_(rtsBool wait_foreign)
#endif
endProfiling();
#endif
endProfiling();
+ freeProfiling1();
#ifdef PROFILING
// Originally, this was in report_ccs_profiling(). Now, retainer
#ifdef PROFILING
// Originally, this was in report_ccs_profiling(). Now, retainer