From 2cddc873d21695166265d4c87c1939e5269a5108 Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Sun, 23 Aug 2009 19:28:22 +0200 Subject: Fix assertion failure in pthread_mutex_trylock * sysdeps/generic/pt-mutex-trylock.c [!ALWAYS_TRACK_MUTEX_OWNER] (__pthread_mutex_trylock): Disable owner tracking. --- sysdeps/generic/pt-mutex-trylock.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sysdeps/generic/pt-mutex-trylock.c b/sysdeps/generic/pt-mutex-trylock.c index 5264dc7b..3c8cd03c 100644 --- a/sysdeps/generic/pt-mutex-trylock.c +++ b/sysdeps/generic/pt-mutex-trylock.c @@ -34,6 +34,7 @@ __pthread_mutex_trylock (struct __pthread_mutex *mutex) if (__pthread_spin_trylock (&mutex->__held) == 0) /* Acquired the lock. */ { +#if defined(ALWAYS_TRACK_MUTEX_OWNER) #ifndef NDEBUG self = _pthread_self (); if (self) @@ -44,6 +45,7 @@ __pthread_mutex_trylock (struct __pthread_mutex *mutex) assert (! mutex->owner); mutex->owner = _pthread_self (); } +#endif #endif if (mutex->attr) -- cgit v1.2.3