[PATCH siddhesh/wait_bitset] Use FUTEX_WAIT_BITSET for pthread_cond_timedwait for non-x86: ppc, s390
Richard Henderson
rth@twiddle.net
Wed Nov 7 18:01:00 GMT 2012
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~
More information about the Libc-alpha
mailing list