This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] nptl: SIGCANCEL, SIGTIMER, SIGSETXID are always defined


* Adhemerval Zanella:

> On 18/10/2019 05:28, Florian Weimer wrote:
>> All nptl targets have these signal definitions nowadays.  This
>> changes also replaces the nptl-generic version of pthread_sigmask
>> with the Linux version.
>> 
>> Tested on x86_64-linux-gnu and i686-linux-gnu.  Built with
>> build-many-glibcs.py.
>
> Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>

Sorry, I didn't see your review in my inbox, only Carlos'.

>> diff --git a/sysdeps/nptl/allocrtsig.c b/sysdeps/nptl/allocrtsig.c
>> index e9ea038655..3f62bf40e7 100644
>> --- a/sysdeps/nptl/allocrtsig.c
>> +++ b/sysdeps/nptl/allocrtsig.c
>> @@ -19,32 +19,13 @@
>>  #include <signal.h>
>>  #include <nptl/pthreadP.h>
>>  
>> -/* Up to three special signals might be used privately by libpthread.
>> -   Figure out how many unique ones are actually used.  */
>> -
>> -#ifdef SIGCANCEL
>> -# define SIGCANCEL_CONSUMES     1
>> -#else
>> -# define SIGCANCEL_CONSUMES     0
>> -#endif
>> -
>> -#if defined SIGTIMER && (!defined SIGCANCEL || SIGTIMER != SIGCANCEL)
>> -# define SIGTIMER_CONSUMES      1
>> -#else
>> -# define SIGTIMER_CONSUMES      0
>> -#endif
>> -
>> -#if (defined SIGSETXID \
>> -     && (!defined SIGCANCEL || SIGSETXID != SIGCANCEL) \
>> -     && (!defined SIGTIMER || SIGSETXID != SIGTIMER))
>> -# define SIGSETXID_CONSUMES     1
>> -#else
>> -# define SIGSETXID_CONSUMES     0
>> +#if SIGTIMER != SIGCANCEL
>> +# error "SIGTIMER and SIGCANCEL must be the same"
>>  #endif
>
> Not sure if it is really required them to be the same.

It is required for the constant 2 here:

>>  /* This tells the generic code (included below) how many signal
>> +   numbers need to be reserved for libpthread's private uses
>> +   (SIGCANCEL and SIGSETXID).  */
>> +#define RESERVED_SIGRT 2
>>  
>>  #include <signal/allocrtsig.c>

Thanks,
Florian


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]