[project @ 2005-01-28 12:55:17 by simonmar]
[ghc-hetmet.git] / ghc / rts / RtsStartup.c
index 04bad6d..c5fa744 100644 (file)
@@ -14,6 +14,7 @@
 #include "Storage.h"    /* initStorage, exitStorage */
 #include "Schedule.h"   /* initScheduler */
 #include "Stats.h"      /* initStats */
+#include "STM.h"        /* initSTM */
 #include "Signals.h"
 #include "Timer.h"      /* startTimer, stopTimer */
 #include "Weak.h"
@@ -48,7 +49,7 @@
 # include "LLC.h"
 #endif
 
-#if defined(mingw32_TARGET_OS)
+#if defined(mingw32_HOST_OS)
 #include "win32/AsyncIO.h"
 #endif
 
@@ -215,10 +216,12 @@ hs_init(int *argc, char **argv[])
     initDefaultHandlers();
 #endif
  
-#if defined(mingw32_TARGET_OS)
+#if defined(mingw32_HOST_OS)
     startupAsyncIO();
 #endif
 
+    initSTM();
+
 #ifdef RTS_GTK_FRONTPANEL
     if (RtsFlags.GcFlags.frontpanel) {
        initFrontPanel();
@@ -357,11 +360,6 @@ hs_exit(void)
     /* start timing the shutdown */
     stat_startExit();
     
-#if !defined(GRAN)
-    /* Finalize any remaining weak pointers */
-    finalizeWeakPointersNow();
-#endif
-    
     /* stop all running tasks */
     exitScheduler();
     
@@ -441,7 +439,7 @@ hs_exit(void)
     if (RtsFlags.TickyFlags.showTickyStats) PrintTickyInfo();
 #endif
 
-#if defined(mingw32_TARGET_OS)
+#if defined(mingw32_HOST_OS)
     shutdownAsyncIO();
 #endif
 }