X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=includes%2FOSThreads.h;h=dd7f91a92dc8d9a0cf88449555e9b67dbd57a091;hb=4839f119310cd82dec679239e0897e4a2a26ee92;hp=9a3b5aa6c74e4371997f890da039b6458f2fc9a5;hpb=65ff44face84ae30f1ddf7d009d51c1778f8c7d3;p=ghc-hetmet.git diff --git a/includes/OSThreads.h b/includes/OSThreads.h index 9a3b5aa..dd7f91a 100644 --- a/includes/OSThreads.h +++ b/includes/OSThreads.h @@ -82,8 +82,11 @@ typedef pthread_key_t ThreadLocalKey; #if CMINUSMINUS -#define ACQUIRE_LOCK(mutex) EnterCriticalSection(mutex) -#define RELEASE_LOCK(mutex) LeaveCriticalSection(mutex) +/* We jump through a hoop here to get a CCall EnterCriticalSection + and LeaveCriticalSection, as that's what C-- wants. */ + +#define ACQUIRE_LOCK(mutex) CCallEnterCriticalSection(mutex) +#define RELEASE_LOCK(mutex) CCallLeaveCriticalSection(mutex) #define ASSERT_LOCK_HELD(mutex) /* nothing */ #else