Fix the threaded RTS on Windows
[ghc-hetmet.git] / rts / win32 / OSThreads.c
index 24fbabe..13a3666 100644 (file)
@@ -13,6 +13,7 @@
 #if defined(THREADED_RTS)
 #include "OSThreads.h"
 #include "RtsUtils.h"
+#include <windows.h>
 
 /* For reasons not yet clear, the entire contents of process.h is protected 
  * by __STRICT_ANSI__ not being defined.
@@ -231,6 +232,14 @@ forkOS_createThread ( HsStablePtr entry )
                           (unsigned*)&pId) == 0);
 }
 
+void CCallEnterCriticalSection(LPCRITICAL_SECTION s) {
+    EnterCriticalSection(s);
+}
+
+void CCallLeaveCriticalSection(LPCRITICAL_SECTION s) {
+    LeaveCriticalSection(s);
+}
+
 #else /* !defined(THREADED_RTS) */
 
 int