From: Ian Lynagh Date: Sun, 18 Jan 2009 19:33:28 +0000 (+0000) Subject: Always use PTHREAD_MUTEX_ERRORCHECK to create mutexes when -DDEBUG X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=3be1d26ced96ec689f22c97fd1dc077e956cee5d;p=ghc-hetmet.git Always use PTHREAD_MUTEX_ERRORCHECK to create mutexes when -DDEBUG Linux defines PTHREAD_MUTEX_ERRORCHECK = PTHREAD_MUTEX_ERRORCHECK_NP anyway, so there's no need to special-case it. --- diff --git a/rts/posix/OSThreads.c b/rts/posix/OSThreads.c index ee4958a..6e01f82 100644 --- a/rts/posix/OSThreads.c +++ b/rts/posix/OSThreads.c @@ -107,11 +107,7 @@ initMutex(Mutex* pMut) #if defined(DEBUG) pthread_mutexattr_t attr; pthread_mutexattr_init(&attr); -#if defined(linux_HOST_OS) - pthread_mutexattr_settype(&attr,PTHREAD_MUTEX_ERRORCHECK_NP); -#else pthread_mutexattr_settype(&attr,PTHREAD_MUTEX_ERRORCHECK); -#endif pthread_mutex_init(pMut,&attr); #else pthread_mutex_init(pMut,NULL);