summaryrefslogtreecommitdiff
path: root/sysdeps/generic/pt-mutex-trylock.c
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2009-08-23 19:28:22 +0200
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2009-08-23 19:28:22 +0200
commit573e2e6130fd6a2dcba09029a97000668c27c6e9 (patch)
treef7c9b6e22f64a398a6f5753620bad3bc27181e8e /sysdeps/generic/pt-mutex-trylock.c
parent62d9be6cc6d07582e83c23d26cac37438e6f4b5b (diff)
Fix assertion failure in pthread_mutex_trylock
* sysdeps/generic/pt-mutex-trylock.c [!ALWAYS_TRACK_MUTEX_OWNER] (__pthread_mutex_trylock): Disable owner tracking.
Diffstat (limited to 'sysdeps/generic/pt-mutex-trylock.c')
-rw-r--r--sysdeps/generic/pt-mutex-trylock.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sysdeps/generic/pt-mutex-trylock.c b/sysdeps/generic/pt-mutex-trylock.c
index 5264dc7..3c8cd03 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)
@@ -45,6 +46,7 @@ __pthread_mutex_trylock (struct __pthread_mutex *mutex)
mutex->owner = _pthread_self ();
}
#endif
+#endif
if (mutex->attr)
switch (mutex->attr->mutex_type)