/* free the stable pointer table */
exitStablePtrTable();
- freeProfiling1();
-
#if defined(DEBUG)
/* free the thread label table */
freeThreadLabelTable();
reportCCSProfiling();
#endif
+ freeProfiling1();
+
endProfiling();
#ifdef PROFILING
#endif
#if defined(mingw32_HOST_OS) && !defined(THREADED_RTS)
- shutdownAsyncIO();
+ shutdownAsyncIO(wait_foreign);
#endif
/* free hash table storage */