summaryrefslogtreecommitdiffstats
path: root/libpthread/nptl/sysdeps/pthread/pthread_rwlock_timedwrlock.c
diff options
context:
space:
mode:
authorAustin Foxley <austinf@cetoncorp.com>2010-02-16 12:27:18 -0800
committerAustin Foxley <austinf@cetoncorp.com>2010-02-16 12:27:18 -0800
commita032a6587011cbdac8c2f7e11f15dc4e592bbb55 (patch)
treeb8d8dfc6abf0168e098223c2134a3e4bd7640942 /libpthread/nptl/sysdeps/pthread/pthread_rwlock_timedwrlock.c
parent70f1d42b13a741f603472f405299e5d2938aa728 (diff)
downloaduClibc-alpine-a032a6587011cbdac8c2f7e11f15dc4e592bbb55.tar.bz2
uClibc-alpine-a032a6587011cbdac8c2f7e11f15dc4e592bbb55.tar.xz
mass sync with glibc nptl
Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
Diffstat (limited to 'libpthread/nptl/sysdeps/pthread/pthread_rwlock_timedwrlock.c')
-rw-r--r--libpthread/nptl/sysdeps/pthread/pthread_rwlock_timedwrlock.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/libpthread/nptl/sysdeps/pthread/pthread_rwlock_timedwrlock.c b/libpthread/nptl/sysdeps/pthread/pthread_rwlock_timedwrlock.c
index d9caa85bb..e6fcb1640 100644
--- a/libpthread/nptl/sysdeps/pthread/pthread_rwlock_timedwrlock.c
+++ b/libpthread/nptl/sysdeps/pthread/pthread_rwlock_timedwrlock.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2003, 2004 Free Software Foundation, Inc.
+/* Copyright (C) 2003, 2004, 2007 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Martin Schwidefsky <schwidefsky@de.ibm.com>, 2003.
@@ -33,7 +33,7 @@ pthread_rwlock_timedwrlock (
int result = 0;
/* Make sure we are along. */
- lll_mutex_lock (rwlock->__data.__lock);
+ lll_lock (rwlock->__data.__lock, rwlock->__data.__shared);
while (1)
{
@@ -100,14 +100,14 @@ pthread_rwlock_timedwrlock (
int waitval = rwlock->__data.__writer_wakeup;
/* Free the lock. */
- lll_mutex_unlock (rwlock->__data.__lock);
+ lll_unlock (rwlock->__data.__lock, rwlock->__data.__shared);
/* Wait for the writer or reader(s) to finish. */
err = lll_futex_timed_wait (&rwlock->__data.__writer_wakeup,
- waitval, &rt);
+ waitval, &rt, rwlock->__data.__shared);
/* Get the lock. */
- lll_mutex_lock (rwlock->__data.__lock);
+ lll_lock (rwlock->__data.__lock, rwlock->__data.__shared);
/* To start over again, remove the thread from the writer list. */
--rwlock->__data.__nr_writers_queued;
@@ -121,7 +121,7 @@ pthread_rwlock_timedwrlock (
}
/* We are done, free the lock. */
- lll_mutex_unlock (rwlock->__data.__lock);
+ lll_unlock (rwlock->__data.__lock, rwlock->__data.__shared);
return result;
}