diff options
author | Simon Marlow <simonmar@microsoft.com> | 2006-08-30 14:02:52 +0000 |
---|---|---|
committer | Simon Marlow <simonmar@microsoft.com> | 2006-08-30 14:02:52 +0000 |
commit | ab1e183aa7801f9260a9cbb6edbd553cf8249b25 (patch) | |
tree | 7245d178055f0f05ce45c74d8eca56eea49af2b2 /rts/win32 | |
parent | ee4d9a57ab125607e3029a8c1d052114956811f5 (diff) | |
download | haskell-ab1e183aa7801f9260a9cbb6edbd553cf8249b25.tar.gz |
add sysErrorBelch() for reporting system call errors
Diffstat (limited to 'rts/win32')
-rw-r--r-- | rts/win32/OSThreads.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/rts/win32/OSThreads.c b/rts/win32/OSThreads.c index 00effdaaac..32800e73bd 100644 --- a/rts/win32/OSThreads.c +++ b/rts/win32/OSThreads.c @@ -38,7 +38,8 @@ initCondition( Condition* pCond ) NULL); /* unnamed => process-local. */ if ( h == NULL ) { - errorBelch("initCondition: unable to create"); + sysErrorBelch("initCondition: unable to create"); + stg_exit(EXIT_FAILURE); } *pCond = h; return; @@ -48,7 +49,7 @@ void closeCondition( Condition* pCond ) { if ( CloseHandle(*pCond) == 0 ) { - errorBelch("closeCondition: failed to close"); + sysErrorBelch("closeCondition: failed to close"); } return; } @@ -64,7 +65,8 @@ rtsBool signalCondition ( Condition* pCond ) { if (SetEvent(*pCond) == 0) { - barf("SetEvent: %d", GetLastError()); + sysErrorBelch("SetEvent"); + stg_exit(EXIT_FAILURE); } return rtsTrue; } |