summaryrefslogtreecommitdiff
path: root/nptl/pthread_mutex_unlock.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2007-07-31 17:46:17 +0000
committerJakub Jelinek <jakub@redhat.com>2007-07-31 17:46:17 +0000
commit8833066b122427710a9e14a888ce6cfa862332d3 (patch)
tree29591019d695919417b3698618d6a342e97381d6 /nptl/pthread_mutex_unlock.c
parentfedca46896bdb702cb988837a0c2c5447e72ba2b (diff)
Updated to fedora-glibc-20070731T1624cvs/fedora-glibc-2_6_90-1
Diffstat (limited to 'nptl/pthread_mutex_unlock.c')
-rw-r--r--nptl/pthread_mutex_unlock.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/nptl/pthread_mutex_unlock.c b/nptl/pthread_mutex_unlock.c
index 33919d60af..642e3a4442 100644
--- a/nptl/pthread_mutex_unlock.c
+++ b/nptl/pthread_mutex_unlock.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.
@@ -31,7 +31,8 @@ __pthread_mutex_unlock_usercnt (mutex, decr)
{
int newowner = 0;
- switch (__builtin_expect (mutex->__data.__kind, PTHREAD_MUTEX_TIMED_NP))
+ switch (__builtin_expect (PTHREAD_MUTEX_TYPE (mutex),
+ PTHREAD_MUTEX_TIMED_NP))
{
case PTHREAD_MUTEX_RECURSIVE_NP:
/* Recursive mutex. */
@@ -240,7 +241,9 @@ __pthread_mutex_unlock_usercnt (mutex, decr)
newval, oldval));
if ((oldval & ~PTHREAD_MUTEX_PRIO_CEILING_MASK) > 1)
- lll_futex_wake (&mutex->__data.__lock, 1);
+ lll_futex_wake (&mutex->__data.__lock, 1,
+ // XYZ check mutex flag
+ LLL_SHARED);
int oldprio = newval >> PTHREAD_MUTEX_PRIO_CEILING_SHIFT;
return __pthread_tpp_change_priority (oldprio, -1);