X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=includes%2FOSThreads.h;fp=includes%2FOSThreads.h;h=dd7f91a92dc8d9a0cf88449555e9b67dbd57a091;hb=0ee85183fac8129a3c1b890849f32f30fd3940ec;hp=9a3b5aa6c74e4371997f890da039b6458f2fc9a5;hpb=0065868100d8e62bc2cc07fcac6c00da0810ffee;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