This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH 4/4] nptl: Add default cancellable futex calls
- From: Adhemerval Zanella <azanella at linux dot vnet dot ibm dot com>
- To: "Joseph S. Myers" <joseph at codesourcery dot com>
- Cc: "GNU C. Library" <libc-alpha at sourceware dot org>
- Date: Mon, 22 Sep 2014 10:14:43 -0300
- Subject: Re: [PATCH 4/4] nptl: Add default cancellable futex calls
- Authentication-results: sourceware.org; auth=none
- References: <541C2901 dot 1050609 at linux dot vnet dot ibm dot com> <541C2B18 dot 4090107 at linux dot vnet dot ibm dot com> <541C2DE0 dot 80100 at linux dot vnet dot ibm dot com> <Pine dot LNX dot 4 dot 64 dot 1409191702240 dot 11496 at digraph dot polyomino dot org dot uk>
Hi Joseph, thanks for the review.
On 19-09-2014 14:02, Joseph S. Myers wrote:
> 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.
Right, I will adjust it.
>