summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Marlow <marlowsd@gmail.com>2011-02-10 15:00:35 +0000
committerSimon Marlow <marlowsd@gmail.com>2011-02-10 15:00:35 +0000
commit98ad599b6f333d8d13fc9571e24fbb8587f12a94 (patch)
treea9d589484418119c2650785f24f9f647497c1707
parentc9629e9f5e4957c8665fc2497b5e769b769cb7d3 (diff)
downloadhaskell-98ad599b6f333d8d13fc9571e24fbb8587f12a94.tar.gz
fix TRY_ACQUIRE_LOCK on Windows.
-rw-r--r--includes/rts/OSThreads.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/includes/rts/OSThreads.h b/includes/rts/OSThreads.h
index ee59a5f62c..a24459cc6c 100644
--- a/includes/rts/OSThreads.h
+++ b/includes/rts/OSThreads.h
@@ -126,7 +126,7 @@ typedef CRITICAL_SECTION Mutex;
#else
#define ACQUIRE_LOCK(mutex) EnterCriticalSection(mutex)
-#define TRY_ACQUIRE_LOCK(mutex) (TryEnterCriticalSection(mutex) != 0)
+#define TRY_ACQUIRE_LOCK(mutex) (TryEnterCriticalSection(mutex) == 0)
#define RELEASE_LOCK(mutex) LeaveCriticalSection(mutex)
// I don't know how to do this. TryEnterCriticalSection() doesn't do