[project @ 2005-03-02 11:06:58 by simonmar]
[ghc-hetmet.git] / ghc / rts / OSThreads.c
index 1f44f81..7ed6fd8 100644 (file)
@@ -144,7 +144,7 @@ initCondition( Condition* pCond )
                          NULL); /* unnamed => process-local. */
   
   if ( h == NULL ) {
-    belch("initCondition: unable to create");
+    errorBelch("initCondition: unable to create");
   }
   *pCond = h;
   return;
@@ -154,7 +154,7 @@ void
 closeCondition( Condition* pCond )
 {
   if ( CloseHandle(*pCond) == 0 ) {
-    belch("closeCondition: failed to close");
+    errorBelch("closeCondition: failed to close");
   }
   return;
 }
@@ -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);
   return rtsTrue;
 }