This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH siddhesh/wait_bitset] Use FUTEX_WAIT_BITSET for pthread_cond_timedwaitfor non-x86: ppc, s390
- From: Richard Henderson <rth at twiddle dot net>
- To: Siddhesh Poyarekar <siddhesh at redhat dot com>
- Cc: Jeff Law <law at redhat dot com>, Roland McGrath <roland at hack dot frob dot com>, libc-alpha at sourceware dot org
- Date: Wed, 07 Nov 2012 10:01:42 -0800
- Subject: Re: [PATCH siddhesh/wait_bitset] Use FUTEX_WAIT_BITSET for pthread_cond_timedwaitfor non-x86: ppc, s390
- References: <20121022182330.4f774b71@spoyarek> <20121024000039.5492B2C061@topped-with-meat.com> <20121026154911.11670185@spoyarek> <508ACE76.3030908@redhat.com> <20121027082117.78c86bff@spoyarek> <50942BDF.2030605@redhat.com> <20121105160417.13ab4aef@spoyarek>
On 2012-11-05 02:34, Siddhesh Poyarekar wrote:
> +#else
> +#define lll_futex_timed_wait_bitset(futexp, val, timespec, clockbit, private) \
> + ({ \
> + INTERNAL_SYSCALL_DECL (__err); \
> + long int __ret; \
> + int __op = FUTEX_WAIT_BITSET | clockbit; \
> + \
> + __ret = INTERNAL_SYSCALL (futex, __err, 6, (futexp), \
> + __lll_private_flag (__op, private), \
> + (val), (timespec), NULL /* Unused. */, \
> + FUTEX_BITSET_MATCH_ANY); \
> + __ret; \
> + })
The nice thing about using this version is that it is totally generic,
and usable on all targets.
While I wouldn't expect you to rearrange the current structure of all
of the lowlevellock.h headers to something that could actually share
this, having the generic version pasted into each makes it much more
obvious that each target is doing the same thing.
r~