X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=includes%2FOSThreads.h;h=d79b9affc7586ab64dc290f28a5d3d5e538723d2;hb=b0ca990457eaf7991e72b13d0040d937b5759b36;hp=dd7f91a92dc8d9a0cf88449555e9b67dbd57a091;hpb=0ee85183fac8129a3c1b890849f32f30fd3940ec;p=ghc-hetmet.git diff --git a/includes/OSThreads.h b/includes/OSThreads.h index dd7f91a..d79b9af 100644 --- a/includes/OSThreads.h +++ b/includes/OSThreads.h @@ -16,8 +16,8 @@ #if CMINUSMINUS -#define ACQUIRE_LOCK(mutex) pthread_mutex_lock(mutex) -#define RELEASE_LOCK(mutex) pthread_mutex_unlock(mutex) +#define ACQUIRE_LOCK(mutex) foreign "C" pthread_mutex_lock(mutex) +#define RELEASE_LOCK(mutex) foreign "C" pthread_mutex_unlock(mutex) #define ASSERT_LOCK_HELD(mutex) /* nothing */ #else @@ -85,8 +85,8 @@ typedef pthread_key_t ThreadLocalKey; /* 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 ACQUIRE_LOCK(mutex) foreign "stdcall" EnterCriticalSection(mutex) +#define RELEASE_LOCK(mutex) foreign "stdcall" LeaveCriticalSection(mutex) #define ASSERT_LOCK_HELD(mutex) /* nothing */ #else