diff options
author | Ulrich Drepper <drepper@redhat.com> | 2007-05-29 16:15:48 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2007-05-29 16:15:48 +0000 |
commit | ee5d5755a826eb7b48bdf020bef397a33868780b (patch) | |
tree | 54bfdd1a4b47b26d97b3dada3c78d729405718ac /nptl/pthread_cond_timedwait.c | |
parent | 5da4373cfd0bf070ec3ece378c4dea9b027c0ce2 (diff) | |
download | glibc-ee5d5755a826eb7b48bdf020bef397a33868780b.tar.gz glibc-ee5d5755a826eb7b48bdf020bef397a33868780b.tar.xz glibc-ee5d5755a826eb7b48bdf020bef397a33868780b.zip |
* sysdeps/unix/sysv/linux/internaltypes.h: Introduce
COND_NWAITERS_SHIFT. * pthread_cond_destroy.c: Use COND_NWAITERS_SHIFT instead of COND_CLOCK_BITS. * pthread_cond_init.c: Likewise. * pthread_cond_timedwait.c: Likewise. * pthread_cond_wait.c: Likewise. * pthread_condattr_getclock.c: Likewise. * pthread_condattr_setclock.c: Likewise. * sysdeps/unix/sysv/linux/lowlevelcond.sym: Likewise. * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise. * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise. * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise. * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
Diffstat (limited to 'nptl/pthread_cond_timedwait.c')
-rw-r--r-- | nptl/pthread_cond_timedwait.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/nptl/pthread_cond_timedwait.c b/nptl/pthread_cond_timedwait.c index fdbf43eae8..261b4484ba 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. */ |