X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=rts%2FRtsStartup.c;h=b0cddbd18fa99343f5308343191b8f92fb78ffab;hb=0a5613f40b0e32cf59966e6b56b807cdbe80aa7b;hp=afa38aaf2c0cdc9433336f848906be943577f741;hpb=063b822bb68f84dd9729327bb1765637c25aceb4;p=ghc-hetmet.git diff --git a/rts/RtsStartup.c b/rts/RtsStartup.c index afa38aa..b0cddbd 100644 --- a/rts/RtsStartup.c +++ b/rts/RtsStartup.c @@ -34,6 +34,7 @@ #include "Profiling.h" #include "Timer.h" #include "Globals.h" +void exitLinker( void ); // there is no Linker.h file to include #if defined(RTS_GTK_FRONTPANEL) #include "FrontPanel.h" @@ -149,6 +150,9 @@ hs_init(int *argc, char **argv[]) #ifdef TRACING initTracing(); #endif + /* Dtrace events are always enabled + */ + dtraceEventStartup(); /* initialise scheduler data structures (needs to be done before * initStorage()). @@ -167,13 +171,22 @@ hs_init(int *argc, char **argv[]) */ getStablePtr((StgPtr)runIO_closure); getStablePtr((StgPtr)runNonIO_closure); + + getStablePtr((StgPtr)runFinalizerBatch_closure); + getStablePtr((StgPtr)stackOverflow_closure); getStablePtr((StgPtr)heapOverflow_closure); - getStablePtr((StgPtr)runFinalizerBatch_closure); getStablePtr((StgPtr)unpackCString_closure); getStablePtr((StgPtr)blockedIndefinitelyOnMVar_closure); getStablePtr((StgPtr)nonTermination_closure); getStablePtr((StgPtr)blockedIndefinitelyOnSTM_closure); + getStablePtr((StgPtr)nestedAtomically_closure); + + getStablePtr((StgPtr)runSparks_closure); + getStablePtr((StgPtr)ensureIOManagerIsRunning_closure); +#ifndef mingw32_HOST_OS + getStablePtr((StgPtr)runHandlers_closure); +#endif /* initialise the shared Typeable store */ initGlobalStore(); @@ -359,7 +372,7 @@ hs_exit_(rtsBool wait_foreign) /* stop the ticker */ stopTimer(); - exitTimer(); + exitTimer(wait_foreign); // set the terminal settings back to what they were #if !defined(mingw32_HOST_OS) @@ -385,6 +398,9 @@ hs_exit_(rtsBool wait_foreign) /* free shared Typeable store */ exitGlobalStore(); + /* free linker data */ + exitLinker(); + /* free file locking tables, if necessary */ #if !defined(mingw32_HOST_OS) freeFileLocking();