Extend ModBreaks with the srcspan's of the enclosing expressions
[ghc-hetmet.git] / rts / RtsStartup.c
index 8be4044..951b07f 100644 (file)
@@ -463,8 +463,6 @@ hs_exit_(rtsBool wait_foreign)
     /* free the stable pointer table */
     exitStablePtrTable();
 
-    freeProfiling1();
-
 #if defined(DEBUG)
     /* free the thread label table */
     freeThreadLabelTable();
@@ -480,6 +478,8 @@ hs_exit_(rtsBool wait_foreign)
     reportCCSProfiling();
 #endif
 
+    freeProfiling1();
+
     endProfiling();
 
 #ifdef PROFILING
@@ -494,7 +494,7 @@ hs_exit_(rtsBool wait_foreign)
 #endif
 
 #if defined(mingw32_HOST_OS) && !defined(THREADED_RTS)
-    shutdownAsyncIO();
+    shutdownAsyncIO(wait_foreign);
 #endif
 
     /* free hash table storage */