fix haddock submodule pointer
[ghc-hetmet.git] / includes / rts / OSThreads.h
index ee59a5f..c70f418 100644 (file)
@@ -17,7 +17,7 @@
 
 #if defined(THREADED_RTS) /* to the end */
 
-# if defined(HAVE_PTHREAD_H) && !defined(WANT_NATIVE_WIN32_THREADS)
+#if defined(HAVE_PTHREAD_H) && !defined(mingw32_HOST_OS)
 
 #if CMINUSMINUS
 
@@ -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