Repository : ssh://darcs.haskell.org//srv/darcs/ghc

On branch  : 

http://hackage.haskell.org/trac/ghc/changeset/98ad599b6f333d8d13fc9571e24fbb8587f12a94

>---------------------------------------------------------------

commit 98ad599b6f333d8d13fc9571e24fbb8587f12a94
Author: Simon Marlow <[email protected]>
Date:   Thu Feb 10 15:00:35 2011 +0000

    fix TRY_ACQUIRE_LOCK on Windows.

>---------------------------------------------------------------

 includes/rts/OSThreads.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/includes/rts/OSThreads.h b/includes/rts/OSThreads.h
index ee59a5f..a24459c 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



_______________________________________________
Cvs-ghc mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-ghc

Reply via email to