From: simonmar Date: Fri, 21 Oct 2005 15:18:54 +0000 (+0000) Subject: [project @ 2005-10-21 15:18:54 by simonmar] X-Git-Tag: Initial_conversion_from_CVS_complete~148 X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=commitdiff_plain;h=3fe03f82f9bb1a17bb46925c8804a26e016d3a51 [project @ 2005-10-21 15:18:54 by simonmar] Fix Win32 DEBUG warnings --- diff --git a/ghc/includes/OSThreads.h b/ghc/includes/OSThreads.h index 7579f88..df65dcd 100644 --- a/ghc/includes/OSThreads.h +++ b/ghc/includes/OSThreads.h @@ -82,21 +82,15 @@ typedef DWORD ThreadLocalKey; #define INIT_MUTEX_VAR 0 #define INIT_COND_VAR 0 -INLINE_HEADER void -ACQUIRE_LOCK(Mutex *mutex) -{ - if (WaitForSingleObject(*mutex,INFINITE) == WAIT_FAILED) { - barf("WaitForSingleObject: %d", GetLastError()); +#define ACQUIRE_LOCK(mutex) \ + if (WaitForSingleObject(*mutex,INFINITE) == WAIT_FAILED) { \ + barf("WaitForSingleObject: %d", GetLastError()); \ } -} -INLINE_HEADER void -RELEASE_LOCK(Mutex *mutex) -{ - if (ReleaseMutex(*mutex) == 0) { - barf("ReleaseMutex: %d", GetLastError()); +#define RELEASE_LOCK(mutex) \ + if (ReleaseMutex(*mutex) == 0) { \ + barf("ReleaseMutex: %d", GetLastError()); \ } -} #define ASSERT_LOCK_HELD(mutex) /* nothing */