#include "ThreadLabels.h"
#include "BlockAlloc.h"
#include "Trace.h"
+#include "RtsTypeable.h"
#if defined(RTS_GTK_FRONTPANEL)
#include "FrontPanel.h"
/* initialise the stable pointer table */
initStablePtrTable();
+ /* initialise the shared Typeable store */
+ initTypeableStore();
+
#if defined(DEBUG)
/* initialise thread label table (tso->char*) */
initThreadLabelTable();
// also outputs the stats (+RTS -s) info.
exitStorage();
+ /* free shared Typeable store */
+ exitTypeableStore();
+
/* initialise the stable pointer table */
exitStablePtrTable();
static int exit_started=rtsFalse;
#endif
+void (*exitFn)(int) = 0;
+
void
stg_exit(int n)
{
IF_PAR_DEBUG(verbose, debugBelch("==-- stg_exit %d on [%x]...", n, mytid));
shutdownParallelSystem(n);
#endif
+ if (exitFn)
+ (*exitFn)(n);
exit(n);
}