[vlc-devel] commit: Force normal rather than default mutexes in release mode ( Rémi Denis-Courmont )
git version control
git at videolan.org
Mon Aug 3 18:12:47 CEST 2009
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Mon Aug 3 19:08:49 2009 +0300| [53c895bcfb948449640a579e8059dc0eeaa16b26] | committer: Rémi Denis-Courmont
Force normal rather than default mutexes in release mode
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=53c895bcfb948449640a579e8059dc0eeaa16b26
---
src/misc/pthread.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/src/misc/pthread.c b/src/misc/pthread.c
index ceac6fc..08f5ef2 100644
--- a/src/misc/pthread.c
+++ b/src/misc/pthread.c
@@ -141,7 +141,9 @@ void vlc_mutex_init( vlc_mutex_t *p_mutex )
if( pthread_mutexattr_init( &attr ) )
abort();
-#ifndef NDEBUG
+#ifdef NDEBUG
+ pthread_mutexattr_settype( &attr, PTHREAD_MUTEX_NORMAL );
+#else
/* Create error-checking mutex to detect problems more easily. */
# if defined (__GLIBC__) && (__GLIBC_MINOR__ < 6)
pthread_mutexattr_setkind_np( &attr, PTHREAD_MUTEX_ERRORCHECK_NP );
More information about the vlc-devel
mailing list