X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=rts%2FRtsStartup.c;h=4f84468b0a8a61afc18ee863b54a0a5f6bd5ce85;hb=5123ae93cfc5cdfcecc84340a9517580ad900d64;hp=51047218feca73c4d7aff1ca4cf4de0eca77ca58;hpb=bb276c343d6e2257326afa4f742ce5bfbb659567;p=ghc-hetmet.git diff --git a/rts/RtsStartup.c b/rts/RtsStartup.c index 5104721..4f84468 100644 --- a/rts/RtsStartup.c +++ b/rts/RtsStartup.c @@ -33,6 +33,7 @@ #include "RtsTypeable.h" #include "Stable.h" #include "Hpc.h" +#include "FileLock.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 file locking, if necessary */ +#if !defined(mingw32_HOST_OS) + initFileLocking(); +#endif + #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'. */ + initTimer(); startTimer(); /* Initialise the stats department */ @@ -409,6 +416,7 @@ hs_exit_(rtsBool wait_foreign) /* stop the ticker */ stopTimer(); + exitTimer(); /* reset the standard file descriptors to blocking mode */ resetNonBlockingFd(0); @@ -460,6 +468,11 @@ hs_exit_(rtsBool wait_foreign) /* free shared Typeable store */ exitTypeableStore(); + /* free file locking tables, if necessary */ +#if !defined(mingw32_HOST_OS) + freeFileLocking(); +#endif + /* free the stable pointer table */ exitStablePtrTable();