diff options
author | Ian Lynagh <igloo@earth.li> | 2007-08-16 15:45:16 +0000 |
---|---|---|
committer | Ian Lynagh <igloo@earth.li> | 2007-08-16 15:45:16 +0000 |
commit | 0ee85183fac8129a3c1b890849f32f30fd3940ec (patch) | |
tree | c86e5eb41f10229607353a742abdac55783696e5 /rts/win32/OSThreads.c | |
parent | 0065868100d8e62bc2cc07fcac6c00da0810ffee (diff) | |
download | haskell-0ee85183fac8129a3c1b890849f32f30fd3940ec.tar.gz |
Fix the threaded RTS on Windows
When calling EnterCriticalSection and LeaveCriticalSection from C--
code, we go via wrappers which use ccall (rather than stdcall).
Diffstat (limited to 'rts/win32/OSThreads.c')
-rw-r--r-- | rts/win32/OSThreads.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/rts/win32/OSThreads.c b/rts/win32/OSThreads.c index 24fbabeaad..13a3666b63 100644 --- a/rts/win32/OSThreads.c +++ b/rts/win32/OSThreads.c @@ -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 |