[project @ 2004-02-26 16:49:34 by simonmar]
authorsimonmar <unknown>
Thu, 26 Feb 2004 16:49:34 +0000 (16:49 +0000)
committersimonmar <unknown>
Thu, 26 Feb 2004 16:49:34 +0000 (16:49 +0000)
waitCondition: use RELEASE_LOCK/ACQUIRE_LOCK because these check the
return value for errors.

ghc/rts/OSThreads.c

index 1f44f81..cac4abe 100644 (file)
@@ -178,10 +178,10 @@ signalCondition ( Condition* pCond )
 rtsBool
 waitCondition ( Condition* pCond, Mutex* pMut )
 {
-  ReleaseMutex(*pMut);
+  RELEASE_LOCK(*pMut);
   WaitForSingleObject(*pCond, INFINITE);
   /* Hmm..use WaitForMultipleObjects() ? */
-  WaitForSingleObject(*pMut, INFINITE);
+  ACQUIRE_LOCK(*pMut, INFINITE);
   return rtsTrue;
 }