[git commit master] nptl: use arch-specific pthread_cond_timedwait and pthread_cond_wait on x86_64
Austin Foxley
austinf at cetoncorp.com
Mon May 3 20:35:59 UTC 2010
commit: http://git.uclibc.org/uClibc/commit/?id=e928e223fd44f0002c035773f9c40d8aad78323c
branch: http://git.uclibc.org/uClibc/commit/?id=refs/heads/master
Generic ones were broken on x86_64, pthread/ex2 test failed while pthread/ex5
worked fine. So use arch-specific functions and fix linkage failure with
__pthread_mutex_cond_lock_adjust.
Signed-off-by: Roman I Khimov <khimov at altell.ru>
Signed-off-by: Austin Foxley <austinf at cetoncorp.com>
---
libpthread/nptl/pthread_mutex_lock.c | 2 +-
.../sysdeps/unix/sysv/linux/x86_64/Makefile.arch | 5 +++--
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/libpthread/nptl/pthread_mutex_lock.c b/libpthread/nptl/pthread_mutex_lock.c
index 6abf323..78b6671 100644
--- a/libpthread/nptl/pthread_mutex_lock.c
+++ b/libpthread/nptl/pthread_mutex_lock.c
@@ -477,7 +477,7 @@ strong_alias (__pthread_mutex_lock, __pthread_mutex_lock_internal)
#ifdef NO_INCR
-void
+void attribute_protected
__pthread_mutex_cond_lock_adjust (
pthread_mutex_t *mutex)
{
diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/Makefile.arch b/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/Makefile.arch
index e481f93..40d9b9d 100644
--- a/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/Makefile.arch
+++ b/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/Makefile.arch
@@ -18,8 +18,7 @@ libpthread_SSRC += lowlevellock.S pthread_barrier_wait.S pthread_cond_signal.S p
sem_post.S sem_timedwait.S lowlevelrobustlock.S \
sem_trywait.S sem_wait.S pthread_rwlock_rdlock.S pthread_rwlock_wrlock.S \
pthread_rwlock_timedrdlock.S pthread_rwlock_timedwrlock.S pthread_rwlock_unlock.S \
- pthread_spin_unlock.S cancellation.S
-# pthread_cond_timedwait.S pthread_cond_wait.S
+ pthread_spin_unlock.S cancellation.S pthread_cond_timedwait.S pthread_cond_wait.S
libc_a_SSRC += libc-lowlevellock.S
librt_a_SSRC += librt-lowlevellock.S
@@ -39,6 +38,8 @@ ASFLAGS-cancellation.S = -DNOT_IN_libc=1 -DIS_IN_libpthread=1 -D_LIBC_REENTRANT
ASFLAGS-clone.S = -D_LIBC_REENTRANT
ASFLAGS-vfork.S = -D_LIBC_REENTRANT
+ASFLAGS-pthread_cond_timedwait.S = -D_LIBC_REENTRANT
+ASFLAGS-pthread_cond_wait.S = -D_LIBC_REENTRANT
ASFLAGS-libc-lowlevellock.S = -D_LIBC_REENTRANT
ASFLAGS-libc-cancellation.S = -D_LIBC_REENTRANT
--
1.6.3.3
More information about the uClibc-cvs
mailing list