summary refs log tree commit diff
path: root/nptl/sysdeps/pthread
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2005-09-08 17:41:56 +0000
committerUlrich Drepper <drepper@redhat.com>2005-09-08 17:41:56 +0000
commita3615024b9b204a124429a73d82827b189faaada (patch)
tree25d30717a99ee9950d0c6207ffc599fe4ad3eb49 /nptl/sysdeps/pthread
parentb9b8cf036684d69a1bac70cb604ad7dd4c31b8c4 (diff)
downloadglibc-a3615024b9b204a124429a73d82827b189faaada.tar.gz
glibc-a3615024b9b204a124429a73d82827b189faaada.tar.xz
glibc-a3615024b9b204a124429a73d82827b189faaada.zip
* 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.
Diffstat (limited to 'nptl/sysdeps/pthread')
-rw-r--r--nptl/sysdeps/pthread/pthread_cond_signal.c5
1 files changed, 5 insertions, 0 deletions
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);
     }