From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.0 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL autolearn=ham autolearn_force=no version=3.4.2 Received: from mother.openwall.net (mother.openwall.net [195.42.179.200]) by inbox.vuxu.org (OpenSMTPD) with SMTP id 1c012fb3 for ; Thu, 6 Feb 2020 00:17:31 +0000 (UTC) Received: (qmail 30421 invoked by uid 550); 6 Feb 2020 00:17:30 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Reply-To: musl@lists.openwall.com Received: (qmail 30403 invoked from network); 6 Feb 2020 00:17:29 -0000 Date: Wed, 5 Feb 2020 19:17:17 -0500 From: Rich Felker To: musl@lists.openwall.com Message-ID: <20200206001717.GE1663@brightrain.aerifal.cx> References: <294c4c13f86c6f9ea3593309458bcb75a1d5d9e8.camel@fahlgren.se> <20200205192756.GC1663@brightrain.aerifal.cx> <7c6d2ddc-99ba-4f82-c1dc-5114e7b8f69e@adelielinux.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <7c6d2ddc-99ba-4f82-c1dc-5114e7b8f69e@adelielinux.org> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: Rich Felker Subject: Re: [musl] [PATCH] add support for pthread_sigqueue On Wed, Feb 05, 2020 at 05:06:11PM -0600, A. Wilcox wrote: > On 05/02/2020 13:27, Rich Felker wrote: > > Is the naming pthread_sigqueue (vs pthread_sigqueue_np) intentional? > > Normally pthread functions that are not part of the standard are > > introduced as _np (non-portable) and promoted later if accepted as > > standards since the pthread_* namespace is reserved for future > > directions of the standard. Does glibc have this function with the > > same signature already? > > The signature differs only with the constness of the third argument in > the header. (The constness in the function implementation is correct.) This is not a difference in the signature; the constness in the declaration is meaningless (explicitly ignored by the language). In the definition, it causes the local variable corresponding to the argument to be const, but that's not terribly useful. > It is implemented not only in glibc, but additionally in Solaris 11: > > https://docs.oracle.com/cd/E88353_01/html/E37843/pthread-sigqueue-3c.html Without _np -- interesting. I'm not opposed if this seems to be the consensus. > The corresponding system call was added in Linux 2.6.31, if it matters. > > I have no comments (positive or negative) regarding the addition of this > call nor its implementation other than that the constness should be > fixed in the header. That change isn't needed or wanted; it's just confusing since it looks like it should have some meaning but doesn't. I would remove it from the definition too; we don't normally make arguments gratuitously const even if the function definition doesn't modify them during their lifetime. Rich