diff options
author | Ulrich Drepper <drepper@redhat.com> | 2007-04-28 04:23:56 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2007-04-28 04:23:56 +0000 |
commit | 1bb5f5a1c526c5195e7ae54c98dac71f53a941c1 (patch) | |
tree | 4090b80c94ce8b9f87fb308dd7e888b3afd97913 | |
parent | f672076efaa2c99d1dac92070f1723a8a6378456 (diff) | |
download | glibc-1bb5f5a1c526c5195e7ae54c98dac71f53a941c1.tar glibc-1bb5f5a1c526c5195e7ae54c98dac71f53a941c1.tar.gz glibc-1bb5f5a1c526c5195e7ae54c98dac71f53a941c1.tar.bz2 glibc-1bb5f5a1c526c5195e7ae54c98dac71f53a941c1.zip |
[BZ #4392]
* pthread_mutex_trylock.c (__pthread_mutex_trylock): Treat error
check mutexes like normal mutexes.
-rw-r--r-- | nptl/ChangeLog | 4 | ||||
-rw-r--r-- | nptl/pthread_mutex_trylock.c | 9 |
2 files changed, 5 insertions, 8 deletions
diff --git a/nptl/ChangeLog b/nptl/ChangeLog index 3821229684..ce3ca4101c 100644 --- a/nptl/ChangeLog +++ b/nptl/ChangeLog @@ -1,5 +1,9 @@ 2007-04-27 Ulrich Drepper <drepper@redhat.com> + [BZ #4392] + * pthread_mutex_trylock.c (__pthread_mutex_trylock): Treat error + check mutexes like normal mutexes. + [BZ #4306] * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Initialize the whole sigevent structure to appease valgrind. diff --git a/nptl/pthread_mutex_trylock.c b/nptl/pthread_mutex_trylock.c index 94d519233b..4990ecd711 100644 --- a/nptl/pthread_mutex_trylock.c +++ b/nptl/pthread_mutex_trylock.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2002, 2003, 2005, 2006 Free Software Foundation, Inc. +/* Copyright (C) 2002, 2003, 2005, 2006, 2007 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@redhat.com>, 2002. @@ -58,12 +58,6 @@ __pthread_mutex_trylock (mutex) break; case PTHREAD_MUTEX_ERRORCHECK_NP: - /* Check whether we already hold the mutex. */ - if (__builtin_expect (mutex->__data.__owner == id, 0)) - return EDEADLK; - - /* FALLTHROUGH */ - case PTHREAD_MUTEX_TIMED_NP: case PTHREAD_MUTEX_ADAPTIVE_NP: /* Normal mutex. */ @@ -76,7 +70,6 @@ __pthread_mutex_trylock (mutex) return 0; - case PTHREAD_MUTEX_ROBUST_RECURSIVE_NP: case PTHREAD_MUTEX_ROBUST_ERRORCHECK_NP: case PTHREAD_MUTEX_ROBUST_NORMAL_NP: |