summary refs log tree commit diff
path: root/nptl/pthread_cond_init.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2004-09-02 18:59:24 +0000
committerUlrich Drepper <drepper@redhat.com>2004-09-02 18:59:24 +0000
commit73f7c32c47ab2397935d9fc2aeaa594794b38c7e (patch)
tree1a0f7d20c9009fbd67c33495f9db0a5d665092b3 /nptl/pthread_cond_init.c
parent86aca5ac58e152336e676bc1231acac6adc32068 (diff)
downloadglibc-73f7c32c47ab2397935d9fc2aeaa594794b38c7e.tar.gz
glibc-73f7c32c47ab2397935d9fc2aeaa594794b38c7e.tar.xz
glibc-73f7c32c47ab2397935d9fc2aeaa594794b38c7e.zip
[BZ #357]
Update.
2004-09-02  Steven Munroe  <sjmunroe@us.ibm.com>

	[BZ #357]
	* stdlib/tst-setcontext.c (test_stack): Added test for stack clobber.
	(main): Call test_stack.
	* sysdeps/unix/sysv/linux/powerpc/powerpc32/getcontext.S
	(__getcontext): Push stack frame then save parms in local frame.
	Improve instruction scheduling.
	* sysdeps/unix/sysv/linux/powerpc/powerpc32/swapcontext.S
	(__swapcontext): Likewise.
Diffstat (limited to 'nptl/pthread_cond_init.c')
-rw-r--r--nptl/pthread_cond_init.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/nptl/pthread_cond_init.c b/nptl/pthread_cond_init.c
index f5fbd64e96..03ac59dbd2 100644
--- a/nptl/pthread_cond_init.c
+++ b/nptl/pthread_cond_init.c
@@ -32,8 +32,9 @@ __pthread_cond_init (cond, cond_attr)
 
   cond->__data.__lock = LLL_MUTEX_LOCK_INITIALIZER;
   cond->__data.__futex = 0;
-  cond->__data.__clock = (icond_attr == NULL
-			  ? CLOCK_REALTIME : (icond_attr->value & 0xfe) >> 1);
+  cond->__data.__nwaiters = (icond_attr != NULL
+			     && ((icond_attr->value & (COND_CLOCK_BITS << 1))
+				 >> 1));
   cond->__data.__total_seq = 0;
   cond->__data.__wakeup_seq = 0;
   cond->__data.__woken_seq = 0;