[PATCH 4/4] nptl: Add default cancellable futex calls

Adhemerval Zanella azanella@linux.vnet.ibm.com
Mon Sep 22 13:15:00 GMT 2014


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.

>



More information about the Libc-alpha mailing list