X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Frts%2FOSThreads.c;h=7ed6fd8b8e732ee4e579182ea2d02ed0e8db6d1b;hb=40a36f09946a5cd7222d9b4e860fa0173e7565da;hp=1f44f81203373dff05d385c3af87f84e42fc311c;hpb=5ed8d6e0729c2990e8e57d052cde54e9f5bb2396;p=ghc-hetmet.git diff --git a/ghc/rts/OSThreads.c b/ghc/rts/OSThreads.c index 1f44f81..7ed6fd8 100644 --- a/ghc/rts/OSThreads.c +++ b/ghc/rts/OSThreads.c @@ -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; }