diff options
author | Siddhesh Poyarekar <siddhesh@redhat.com> | 2013-02-18 16:07:10 +0530 |
---|---|---|
committer | Siddhesh Poyarekar <siddhesh@redhat.com> | 2013-02-18 16:07:10 +0530 |
commit | 8313cb997d2da2465c8560d3164358a68ea1e9ad (patch) | |
tree | b48995a23e51dc148f6a493b68faa9de83c6acdd /nptl/pthreadP.h | |
parent | f78b5caa6ece23ce86f6cabac8edf3ecd6850473 (diff) | |
download | glibc-8313cb997d2da2465c8560d3164358a68ea1e9ad.tar.gz glibc-8313cb997d2da2465c8560d3164358a68ea1e9ad.tar.xz glibc-8313cb997d2da2465c8560d3164358a68ea1e9ad.zip |
FUTEX_*_REQUEUE_PI support for non-x86 code
Add FUTEX_*_REQUEUE_PI support for the default C code and also add implementations for s-390 and ppc.
Diffstat (limited to 'nptl/pthreadP.h')
-rw-r--r-- | nptl/pthreadP.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/nptl/pthreadP.h b/nptl/pthreadP.h index 993a79e250..d08b219b5d 100644 --- a/nptl/pthreadP.h +++ b/nptl/pthreadP.h @@ -577,4 +577,16 @@ extern void __wait_lookup_done (void) attribute_hidden; # define PTHREAD_STATIC_FN_REQUIRE(name) __asm (".globl " #name); #endif +/* Test if the mutex is suitable for the FUTEX_WAIT_REQUEUE_PI operation. */ +#if (defined lll_futex_wait_requeue_pi \ + && defined __ASSUME_REQUEUE_PI) +# define USE_REQUEUE_PI(mut) \ + ((mut) && (mut) != (void *) ~0l \ + && (((mut)->__data.__kind \ + & (PTHREAD_MUTEX_PRIO_INHERIT_NP | PTHREAD_MUTEX_ROBUST_NORMAL_NP)) \ + == PTHREAD_MUTEX_PRIO_INHERIT_NP)) +#else +# define USE_REQUEUE_PI(mut) 0 +#endif + #endif /* pthreadP.h */ |