From e08057b1ff24258dd7460ad81e84491f7a28b424 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Wed, 1 Aug 2007 17:16:42 +0000 Subject: Updated to fedora-glibc-20070801T1703 --- .../unix/sysv/linux/sparc/sparc32/lowlevellock.c | 25 ++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) (limited to 'nptl/sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c') diff --git a/nptl/sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c b/nptl/sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c index cb9578b47b..1ee9b4737b 100644 --- a/nptl/sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c +++ b/nptl/sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c @@ -25,20 +25,35 @@ void -__lll_lock_wait (int *futex) +__lll_lock_wait_private (int *futex) { do { int oldval = atomic_compare_and_exchange_val_24_acq (futex, 2, 1); if (oldval != 0) - lll_futex_wait (futex, 2); + lll_futex_wait (futex, 2, LLL_PRIVATE); + } + while (atomic_compare_and_exchange_val_24_acq (futex, 2, 0) != 0); +} + +#ifdef IS_IN_libpthread +/* These functions don't get included in libc.so */ + +void +__lll_lock_wait (int *futex, int private) +{ + do + { + int oldval = atomic_compare_and_exchange_val_24_acq (futex, 2, 1); + if (oldval != 0) + lll_futex_wait (futex, 2, private); } while (atomic_compare_and_exchange_val_24_acq (futex, 2, 0) != 0); } int -__lll_timedlock_wait (int *futex, const struct timespec *abstime) +__lll_timedlock_wait (int *futex, const struct timespec *abstime, int private) { /* Reject invalid timeouts. */ if (abstime->tv_nsec < 0 || abstime->tv_nsec >= 1000000000) @@ -68,7 +83,7 @@ __lll_timedlock_wait (int *futex, const struct timespec *abstime) /* Wait. */ int oldval = atomic_compare_and_exchange_val_24_acq (futex, 2, 1); if (oldval != 0) - lll_futex_timed_wait (futex, 2, &rt); + lll_futex_timed_wait (futex, 2, &rt, private); } while (atomic_compare_and_exchange_val_24_acq (futex, 2, 0) != 0); @@ -76,8 +91,6 @@ __lll_timedlock_wait (int *futex, const struct timespec *abstime) } -/* This function doesn't get included in libc.so */ -#ifdef IS_IN_libpthread int __lll_timedwait_tid (int *tidp, const struct timespec *abstime) { -- cgit v1.2.3