From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from albireo.enyo.de (albireo.enyo.de [37.24.231.21]) by sourceware.org (Postfix) with ESMTPS id 51753386F45D for ; Tue, 21 Apr 2020 12:01:09 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 51753386F45D Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=deneb.enyo.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=fw@deneb.enyo.de Received: from [172.17.203.2] (helo=deneb.enyo.de) by albireo.enyo.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) id 1jQraO-0004Cf-43; Tue, 21 Apr 2020 12:01:08 +0000 Received: from fw by deneb.enyo.de with local (Exim 4.92) (envelope-from ) id 1jQraO-0001qB-0W; Tue, 21 Apr 2020 14:01:08 +0200 From: Florian Weimer To: Adhemerval Zanella via Libc-alpha Subject: Re: [PATCH v2 3/4] linux: Use pthread_sigmask on sigprocmask References: <20200313194827.4467-1-adhemerval.zanella@linaro.org> <20200313194827.4467-3-adhemerval.zanella@linaro.org> Date: Tue, 21 Apr 2020 14:01:08 +0200 In-Reply-To: <20200313194827.4467-3-adhemerval.zanella@linaro.org> (Adhemerval Zanella via Libc-alpha's message of "Fri, 13 Mar 2020 16:48:26 -0300") Message-ID: <87k129rqt7.fsf@mid.deneb.enyo.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-22.8 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KAM_DMARC_STATUS, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Apr 2020 12:01:10 -0000 * Adhemerval Zanella via Libc-alpha: > With pthread_sigmask on libc.so, it allows consolidate both > implementations. =E2=80=9Cin sigprocmask=E2=80=9D? > diff --git a/nptl/pthreadP.h b/nptl/pthreadP.h > index edec8d0501..c6d8fc69be 100644 > --- a/nptl/pthreadP.h > +++ b/nptl/pthreadP.h > @@ -484,6 +484,7 @@ extern int __pthread_clockjoin_ex (pthread_t, void **= , clockid_t, > attribute_hidden; > extern int __pthread_sigmask (int how, const sigset_t *newmask, > sigset_t *oldmask); > +libc_hidden_proto (__pthread_sigmask) >=20=20 >=20=20 > #if IS_IN (libpthread) > diff --git a/nptl/pthread_sigmask.c b/nptl/pthread_sigmask.c > index 0e326d610c..c6c6e83c08 100644 > --- a/nptl/pthread_sigmask.c > +++ b/nptl/pthread_sigmask.c > @@ -46,6 +46,8 @@ __pthread_sigmask (int how, const sigset_t *newmask, si= gset_t *oldmask) > ? INTERNAL_SYSCALL_ERRNO (result) > : 0); > } > +libc_hidden_def (__pthread_sigmask) > + > versioned_symbol (libc, __pthread_sigmask, pthread_sigmask, GLIBC_2_32); > #if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_32) > strong_alias (__pthread_sigmask, __pthread_sigmask_2); Ah, perhaps put this into the first commit? > diff --git a/sysdeps/unix/sysv/linux/sigprocmask.c b/sysdeps/unix/sysv/li= nux/sigprocmask.c > index eb9e4d5e83..6ed0ab1e6a 100644 > --- a/sysdeps/unix/sysv/linux/sigprocmask.c > +++ b/sysdeps/unix/sysv/linux/sigprocmask.c > + int result =3D __pthread_sigmask (how, set, oset); > + if (result =3D=3D 0) > + return 0; > + __set_errno (result); > + return result; The final statement needs to return -1. It's curious that this does not result in a testsuite failure.