diff options
author | Simon Marlow <simonmar@microsoft.com> | 2007-08-29 10:48:11 +0000 |
---|---|---|
committer | Simon Marlow <simonmar@microsoft.com> | 2007-08-29 10:48:11 +0000 |
commit | b09ab92b65983635c68c8944631b1d53e9b71e42 (patch) | |
tree | bf0e6f512ca4431f0963bf99bcd9c1c68dabb92f /includes | |
parent | 7605f65c7665bf1f58438d4eaf0ce9d56878a1c0 (diff) | |
download | haskell-b09ab92b65983635c68c8944631b1d53e9b71e42.tar.gz |
Windows: remove the {Enter,Leave}CricialSection wrappers
The C-- parser was missing the "stdcall" calling convention for
foreign calls, but once added we can call {Enter,Leave}CricialSection
directly.
Diffstat (limited to 'includes')
-rw-r--r-- | includes/OSThreads.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/includes/OSThreads.h b/includes/OSThreads.h index dd7f91a92d..d79b9affc7 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 |