diff options
author | Ulrich Drepper <drepper@redhat.com> | 2003-05-26 02:47:39 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2003-05-26 02:47:39 +0000 |
commit | 69431c9a21f7393f34330a27df1630520930789e (patch) | |
tree | 1fbd3f1520502c833e676afa3fb5410f92654f85 /nptl/sysdeps/pthread/pthread_cond_broadcast.c | |
parent | 6a998b09ec734d8dd40e690244122a43bf9d7a16 (diff) | |
download | glibc-69431c9a21f7393f34330a27df1630520930789e.tar glibc-69431c9a21f7393f34330a27df1630520930789e.tar.gz glibc-69431c9a21f7393f34330a27df1630520930789e.tar.bz2 glibc-69431c9a21f7393f34330a27df1630520930789e.zip |
Update.
2003-05-25 Ulrich Drepper <drepper@redhat.com>
* sysdeps/unix/sysv/linux/kernel-features.h: Define
__ASSUME_FUTEX_REQUEUE for >= 2.5.70.
* math/test-fenv.c (feexcp_nomask_test): Fix comment.
Diffstat (limited to 'nptl/sysdeps/pthread/pthread_cond_broadcast.c')
-rw-r--r-- | nptl/sysdeps/pthread/pthread_cond_broadcast.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/nptl/sysdeps/pthread/pthread_cond_broadcast.c b/nptl/sysdeps/pthread/pthread_cond_broadcast.c index 1076fe3c50..f34f58cc99 100644 --- a/nptl/sysdeps/pthread/pthread_cond_broadcast.c +++ b/nptl/sysdeps/pthread/pthread_cond_broadcast.c @@ -25,6 +25,7 @@ #include <pthreadP.h> #include <shlib-compat.h> +#include <kernel-features.h> int @@ -54,7 +55,16 @@ __pthread_cond_broadcast (cond) #endif /* Wake everybody. */ - lll_futex_wake (futex, INT_MAX); + pthread_mutex_t *mut = (pthread_mutex_t *) cond->__data.__mutex; + if (__builtin_expect (lll_futex_requeue (futex, 1, MAX_INT, + &mut->__data.__lock) == -EINVAL, + 0)) + { + /* The requeue functionality is not available. */ +#ifndef __ASSUME_FUTEX_REQUEUE + lll_futex_wake (futex, MAX_INT); +#endif + } /* That's all. */ return 0; |