summaryrefslogtreecommitdiff
path: root/rts/RtsStartup.c
diff options
context:
space:
mode:
Diffstat (limited to 'rts/RtsStartup.c')
-rw-r--r--rts/RtsStartup.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/rts/RtsStartup.c b/rts/RtsStartup.c
index 955ad13b4b..98c1dd290c 100644
--- a/rts/RtsStartup.c
+++ b/rts/RtsStartup.c
@@ -36,6 +36,7 @@
#include "LinkerInternals.h"
#include "LibdwPool.h"
#include "sm/CNF.h"
+#include "TopHandler.h"
#if defined(PROFILING)
# include "ProfHeap.h"
@@ -242,6 +243,9 @@ hs_init_ghc(int *argc, char **argv[], RtsConfig rts_config)
getStablePtr((StgPtr)runHandlersPtr_closure);
#endif
+ // Initialize the top-level handler system
+ initTopHandler();
+
/* initialise the shared Typeable store */
initGlobalStore();
@@ -414,6 +418,9 @@ hs_exit_(bool wait_foreign)
/* free the Static Pointer Table */
exitStaticPtrTable();
+ /* remove the top-level handler */
+ exitTopHandler();
+
/* free the stable pointer table */
exitStableTables();