From a3615024b9b204a124429a73d82827b189faaada Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 8 Sep 2005 17:41:56 +0000 Subject: * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define. (lll_futex_wake_unlock): Define. * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define. (lll_futex_wake_unlock): Define. * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define. (lll_futex_wake_unlock): Define. * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define. (lll_futex_wake_unlock): Define. * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define. (lll_futex_wake_unlock): Define. * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal): Use lll_futex_wake_unlock. * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define. (__pthread_cond_signal): Use FUTEX_WAKE_OP. * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define. (__pthread_cond_signal): Use FUTEX_WAKE_OP. --- nptl/sysdeps/pthread/pthread_cond_signal.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'nptl/sysdeps/pthread') diff --git a/nptl/sysdeps/pthread/pthread_cond_signal.c b/nptl/sysdeps/pthread/pthread_cond_signal.c index f5623480f8..5a9bbcad91 100644 --- a/nptl/sysdeps/pthread/pthread_cond_signal.c +++ b/nptl/sysdeps/pthread/pthread_cond_signal.c @@ -43,6 +43,11 @@ __pthread_cond_signal (cond) ++cond->__data.__futex; /* Wake one. */ + if (! __builtin_expect (lll_futex_wake_unlock (&cond->__data.__futex, 1, + 1, &cond->__data.__lock), + 0)) + return 0; + lll_futex_wake (&cond->__data.__futex, 1); } -- cgit v1.2.3