This is the mail archive of the
glibc-cvs@sourceware.org
mailing list for the glibc project.
GNU C Library master sources branch, master, updated. glibc-2.10-221-ge73e694
- From: drepper at sourceware dot org
- To: glibc-cvs at sourceware dot org
- Date: 27 Jul 2009 20:47:25 -0000
- Subject: GNU C Library master sources branch, master, updated. glibc-2.10-221-ge73e694
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".
The branch, master has been updated
via e73e694e38b7b222eec3ec5897eb507d88bb8928 (commit)
via 052757bfa652d86d7976df430a5272df1f560076 (commit)
from e83c1a8a72b3ea3009e18ecb3fc0778e81655d3b (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=e73e694e38b7b222eec3ec5897eb507d88bb8928
commit e73e694e38b7b222eec3ec5897eb507d88bb8928
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Jul 27 13:46:56 2009 -0700
pthread_mutex_unlock needs to use _rel semantics for atomic ops.
diff --git a/nptl/ChangeLog b/nptl/ChangeLog
index cb9ec53..8dd9373 100644
--- a/nptl/ChangeLog
+++ b/nptl/ChangeLog
@@ -1,3 +1,9 @@
+2009-07-27 Ulrich Drepper <drepper@redhat.com>
+
+ [BZ #10418]
+ * pthread_mutex_unlock.c (__pthread_mutex_unlock_full): Use _rel
+ instead of of _acq variants of cmpxchg.
+
2009-07-23 Ulrich Drepper <drepper@redhat.com>
* sysdeps/x86_64/configure.in: New file.
diff --git a/nptl/pthread_mutex_unlock.c b/nptl/pthread_mutex_unlock.c
index 0028c55..fbe8274 100644
--- a/nptl/pthread_mutex_unlock.c
+++ b/nptl/pthread_mutex_unlock.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002, 2003, 2005-2007, 2008 Free Software Foundation, Inc.
+/* Copyright (C) 2002, 2003, 2005-2008, 2009 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
@@ -213,7 +213,7 @@ __pthread_mutex_unlock_full (pthread_mutex_t *mutex, int decr)
/* Unlock. */
if ((mutex->__data.__lock & FUTEX_WAITERS) != 0
- || atomic_compare_and_exchange_bool_acq (&mutex->__data.__lock, 0,
+ || atomic_compare_and_exchange_bool_rel (&mutex->__data.__lock, 0,
THREAD_GETMEM (THREAD_SELF,
tid)))
{
@@ -263,7 +263,7 @@ __pthread_mutex_unlock_full (pthread_mutex_t *mutex, int decr)
oldval = mutex->__data.__lock;
newval = oldval & PTHREAD_MUTEX_PRIO_CEILING_MASK;
}
- while (atomic_compare_and_exchange_bool_acq (&mutex->__data.__lock,
+ while (atomic_compare_and_exchange_bool_rel (&mutex->__data.__lock,
newval, oldval));
if ((oldval & ~PTHREAD_MUTEX_PRIO_CEILING_MASK) > 1)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=052757bfa652d86d7976df430a5272df1f560076
commit 052757bfa652d86d7976df430a5272df1f560076
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Jul 27 13:43:01 2009 -0700
Revert "Memory ordering in pthread_mutex_{,timed}lock."
This reverts commit 7b7f43bed134db6a0da34282fffcbf0af10d4613.
diff --git a/nptl/ChangeLog b/nptl/ChangeLog
index 2221121..cb9ec53 100644
--- a/nptl/ChangeLog
+++ b/nptl/ChangeLog
@@ -1,10 +1,3 @@
-2009-07-26 Ulrich Drepper <drepper@redhat.com>
-
- [BZ #10418]
- * pthread_mutex_lock.c (pthread_mutex_lock): Use _rel instead of of
- _acq variants of cmpxchg.
- * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Likewise.
-
2009-07-23 Ulrich Drepper <drepper@redhat.com>
* sysdeps/x86_64/configure.in: New file.
diff --git a/nptl/pthread_mutex_lock.c b/nptl/pthread_mutex_lock.c
index a0ff881..406e588 100644
--- a/nptl/pthread_mutex_lock.c
+++ b/nptl/pthread_mutex_lock.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002-2007, 2008, 2009 Free Software Foundation, Inc.
+/* Copyright (C) 2002-2007, 2008 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
@@ -160,7 +160,7 @@ __pthread_mutex_lock_full (pthread_mutex_t *mutex)
#endif
newval
- = atomic_compare_and_exchange_val_rel (&mutex->__data.__lock,
+ = atomic_compare_and_exchange_val_acq (&mutex->__data.__lock,
newval, oldval);
if (newval != oldval)
@@ -285,7 +285,7 @@ __pthread_mutex_lock_full (pthread_mutex_t *mutex)
#ifdef NO_INCR
newval |= FUTEX_WAITERS;
#endif
- oldval = atomic_compare_and_exchange_val_rel (&mutex->__data.__lock,
+ oldval = atomic_compare_and_exchange_val_acq (&mutex->__data.__lock,
newval, 0);
if (oldval != 0)
@@ -420,7 +420,7 @@ __pthread_mutex_lock_full (pthread_mutex_t *mutex)
oldprio = ceiling;
oldval
- = atomic_compare_and_exchange_val_rel (&mutex->__data.__lock,
+ = atomic_compare_and_exchange_val_acq (&mutex->__data.__lock,
#ifdef NO_INCR
ceilval | 2,
#else
@@ -434,7 +434,7 @@ __pthread_mutex_lock_full (pthread_mutex_t *mutex)
do
{
oldval
- = atomic_compare_and_exchange_val_rel (&mutex->__data.__lock,
+ = atomic_compare_and_exchange_val_acq (&mutex->__data.__lock,
ceilval | 2,
ceilval | 1);
@@ -445,7 +445,7 @@ __pthread_mutex_lock_full (pthread_mutex_t *mutex)
lll_futex_wait (&mutex->__data.__lock, ceilval | 2,
PTHREAD_MUTEX_PSHARED (mutex));
}
- while (atomic_compare_and_exchange_val_rel (&mutex->__data.__lock,
+ while (atomic_compare_and_exchange_val_acq (&mutex->__data.__lock,
ceilval | 2, ceilval)
!= ceilval);
}
diff --git a/nptl/pthread_mutex_timedlock.c b/nptl/pthread_mutex_timedlock.c
index 2c6ff11..8d0db79 100644
--- a/nptl/pthread_mutex_timedlock.c
+++ b/nptl/pthread_mutex_timedlock.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002-2007, 2008, 2009 Free Software Foundation, Inc.
+/* Copyright (C) 2002-2007, 2008 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
@@ -126,7 +126,7 @@ pthread_mutex_timedlock (mutex, abstime)
int newval = id | (oldval & FUTEX_WAITERS);
newval
- = atomic_compare_and_exchange_val_rel (&mutex->__data.__lock,
+ = atomic_compare_and_exchange_val_acq (&mutex->__data.__lock,
newval, oldval);
if (newval != oldval)
{
@@ -246,7 +246,7 @@ pthread_mutex_timedlock (mutex, abstime)
}
}
- oldval = atomic_compare_and_exchange_val_rel (&mutex->__data.__lock,
+ oldval = atomic_compare_and_exchange_val_acq (&mutex->__data.__lock,
id, 0);
if (oldval != 0)
@@ -404,7 +404,7 @@ pthread_mutex_timedlock (mutex, abstime)
oldprio = ceiling;
oldval
- = atomic_compare_and_exchange_val_rel (&mutex->__data.__lock,
+ = atomic_compare_and_exchange_val_acq (&mutex->__data.__lock,
ceilval | 1, ceilval);
if (oldval == ceilval)
@@ -413,7 +413,7 @@ pthread_mutex_timedlock (mutex, abstime)
do
{
oldval
- = atomic_compare_and_exchange_val_rel (&mutex->__data.__lock,
+ = atomic_compare_and_exchange_val_acq (&mutex->__data.__lock,
ceilval | 2,
ceilval | 1);
@@ -456,7 +456,7 @@ pthread_mutex_timedlock (mutex, abstime)
PTHREAD_MUTEX_PSHARED (mutex));
}
}
- while (atomic_compare_and_exchange_val_rel (&mutex->__data.__lock,
+ while (atomic_compare_and_exchange_val_acq (&mutex->__data.__lock,
ceilval | 2, ceilval)
!= ceilval);
}
-----------------------------------------------------------------------
Summary of changes:
nptl/ChangeLog | 7 +++----
nptl/pthread_mutex_lock.c | 12 ++++++------
nptl/pthread_mutex_timedlock.c | 12 ++++++------
nptl/pthread_mutex_unlock.c | 6 +++---
4 files changed, 18 insertions(+), 19 deletions(-)
hooks/post-receive
--
GNU C Library master sources