This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Build fixes for NPTL generic bits
- From: Daniel Jacobowitz <drow at false dot org>
- To: libc-alpha at sourceware dot org
- Date: Tue, 10 Jul 2007 09:39:17 -0400
- Subject: Build fixes for NPTL generic bits
So far only SH, i686, and x86_64 have private futex support. They all
have assembly versions of these routines, so their calls to
lll_futex_wait didn't grow the new argument. I added it in the same
way that the other generic calls have.
--
Daniel Jacobowitz
CodeSourcery
2007-07-10 Daniel Jacobowitz <dan@codesourcery.com>
* pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Add an argument
to lll_futex_wait call.
* pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
Index: nptl/pthread_rwlock_rdlock.c
===================================================================
RCS file: /cvs/glibc/libc/nptl/pthread_rwlock_rdlock.c,v
retrieving revision 1.2
diff -u -p -r1.2 pthread_rwlock_rdlock.c
--- nptl/pthread_rwlock_rdlock.c 26 May 2007 22:11:31 -0000 1.2
+++ nptl/pthread_rwlock_rdlock.c 10 Jul 2007 13:36:35 -0000
@@ -77,7 +77,9 @@ __pthread_rwlock_rdlock (rwlock)
lll_mutex_unlock (rwlock->__data.__lock);
/* Wait for the writer to finish. */
- lll_futex_wait (&rwlock->__data.__readers_wakeup, waitval);
+ lll_futex_wait (&rwlock->__data.__readers_wakeup, waitval,
+ // XYZ check mutex flag
+ LLL_SHARED);
/* Get the lock. */
lll_mutex_lock (rwlock->__data.__lock);
Index: nptl/pthread_rwlock_wrlock.c
===================================================================
RCS file: /cvs/glibc/libc/nptl/pthread_rwlock_wrlock.c,v
retrieving revision 1.1
diff -u -p -r1.1 pthread_rwlock_wrlock.c
--- nptl/pthread_rwlock_wrlock.c 28 Oct 2006 05:11:15 -0000 1.1
+++ nptl/pthread_rwlock_wrlock.c 10 Jul 2007 13:36:35 -0000
@@ -68,7 +68,9 @@ __pthread_rwlock_wrlock (rwlock)
lll_mutex_unlock (rwlock->__data.__lock);
/* Wait for the writer or reader(s) to finish. */
- lll_futex_wait (&rwlock->__data.__writer_wakeup, waitval);
+ lll_futex_wait (&rwlock->__data.__readers_wakeup, waitval,
+ // XYZ check mutex flag
+ LLL_SHARED);
/* Get the lock. */
lll_mutex_lock (rwlock->__data.__lock);