From 0effbe4b69eb1ec22ff097b533d76b0bdb85322f Mon Sep 17 00:00:00 2001 From: simonmar Date: Thu, 26 Feb 2004 16:49:34 +0000 Subject: [PATCH] [project @ 2004-02-26 16:49:34 by simonmar] waitCondition: use RELEASE_LOCK/ACQUIRE_LOCK because these check the return value for errors. --- ghc/rts/OSThreads.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ghc/rts/OSThreads.c b/ghc/rts/OSThreads.c index 1f44f81..cac4abe 100644 --- a/ghc/rts/OSThreads.c +++ b/ghc/rts/OSThreads.c @@ -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; } -- 1.7.10.4