projects
/
ghc-hetmet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c9629e9
)
fix TRY_ACQUIRE_LOCK on Windows.
author
Simon Marlow
<marlowsd@gmail.com>
Thu, 10 Feb 2011 15:00:35 +0000
(15:00 +0000)
committer
Simon Marlow
<marlowsd@gmail.com>
Thu, 10 Feb 2011 15:00:35 +0000
(15:00 +0000)
includes/rts/OSThreads.h
patch
|
blob
|
history
diff --git
a/includes/rts/OSThreads.h
b/includes/rts/OSThreads.h
index
ee59a5f
..
a24459c
100644
(file)
--- 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