[PATCH 4/4] nptl: Add default cancellable futex calls
Joseph S. Myers
joseph@codesourcery.com
Fri Sep 19 17:02:00 GMT 2014
On Fri, 19 Sep 2014, Adhemerval Zanella wrote:
> diff --git a/sysdeps/unix/sysv/linux/lowlevellock-futex.h b/sysdeps/unix/sysv/linux/lowlevellock-futex.h
> index 343afd6..2967ebb 100644
> --- a/sysdeps/unix/sysv/linux/lowlevellock-futex.h
> +++ b/sysdeps/unix/sysv/linux/lowlevellock-futex.h
> @@ -97,6 +97,49 @@
> val, timeout, NULL /* Unused. */, \
> FUTEX_BITSET_MATCH_ANY)
>
> +#define lll_futex_wait_cancel(futexp, val, private) \
> + lll_futex_timed_wait_cancel (futexp, val, NULL, private)
> +
> +#define lll_futex_timed_wait_cancel(futexp, val, timespec, private) \
> + ({ \
> + long int __ret; \
> + int __op = FUTEX_WAIT; \
> + \
> + __ret = __syscall_cancel (__NR_futex, (long int) (futexp), \
> + (long int)__lll_private_flag (__op, private), \
> + (long int)(val), (long int)(timespec), 0, 0); \
As with other patches, do not hardcode the use of "long" for syscall
arguments.
--
Joseph S. Myers
joseph@codesourcery.com
More information about the Libc-alpha
mailing list