From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 73543 invoked by alias); 18 Oct 2019 12:40:53 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Received: (qmail 73521 invoked by uid 89); 18 Oct 2019 12:40:52 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-18.5 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,SPF_HELO_PASS autolearn=ham version=3.3.1 spammy= X-HELO: mx1.redhat.com From: Florian Weimer To: Adhemerval Zanella Cc: libc-alpha@sourceware.org Subject: Re: [PATCH] nptl: SIGCANCEL, SIGTIMER, SIGSETXID are always defined References: <87zhhyv4nj.fsf@oldenburg2.str.redhat.com> <8f60105f-a510-e46c-1a25-829a5e727233@linaro.org> Date: Fri, 18 Oct 2019 12:40:00 -0000 In-Reply-To: <8f60105f-a510-e46c-1a25-829a5e727233@linaro.org> (Adhemerval Zanella's message of "Fri, 18 Oct 2019 09:30:59 -0300") Message-ID: <87tv86rzu7.fsf@oldenburg2.str.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SW-Source: 2019-10/txt/msg00555.txt.bz2 * 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 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 >> #include >> >> -/* 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 Thanks, Florian