aboutsummaryrefslogtreecommitdiff
path: root/nptl/pthread_cond_timedwait.c
diff options
context:
space:
mode:
Diffstat (limited to 'nptl/pthread_cond_timedwait.c')
-rw-r--r--nptl/pthread_cond_timedwait.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/nptl/pthread_cond_timedwait.c b/nptl/pthread_cond_timedwait.c
index fdbf43e..261b448 100644
--- a/nptl/pthread_cond_timedwait.c
+++ b/nptl/pthread_cond_timedwait.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2003, 2004 Free Software Foundation, Inc.
+/* Copyright (C) 2003, 2004, 2007 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Martin Schwidefsky <schwidefsky@de.ibm.com>, 2003.
@@ -67,7 +67,7 @@ __pthread_cond_timedwait (cond, mutex, abstime)
/* We have one new user of the condvar. */
++cond->__data.__total_seq;
++cond->__data.__futex;
- cond->__data.__nwaiters += 1 << COND_CLOCK_BITS;
+ cond->__data.__nwaiters += 1 << COND_NWAITERS_SHIFT;
/* Remember the mutex we are using here. If there is already a
different address store this is a bad user bug. Do not store
@@ -100,7 +100,7 @@ __pthread_cond_timedwait (cond, mutex, abstime)
int ret;
ret = INTERNAL_SYSCALL (clock_gettime, err, 2,
(cond->__data.__nwaiters
- & ((1 << COND_CLOCK_BITS) - 1)),
+ & ((1 << COND_NWAITERS_SHIFT) - 1)),
&rt);
# ifndef __ASSUME_POSIX_TIMERS
if (__builtin_expect (INTERNAL_SYSCALL_ERROR_P (ret, err), 0))
@@ -189,13 +189,13 @@ __pthread_cond_timedwait (cond, mutex, abstime)
bc_out:
- cond->__data.__nwaiters -= 1 << COND_CLOCK_BITS;
+ cond->__data.__nwaiters -= 1 << COND_NWAITERS_SHIFT;
/* If pthread_cond_destroy was called on this variable already,
notify the pthread_cond_destroy caller all waiters have left
and it can be successfully destroyed. */
if (cond->__data.__total_seq == -1ULL
- && cond->__data.__nwaiters < (1 << COND_CLOCK_BITS))
+ && cond->__data.__nwaiters < (1 << COND_NWAITERS_SHIFT))
lll_futex_wake (&cond->__data.__nwaiters, 1);
/* We are done with the condvar. */