From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/14253 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: Re: pthread_getname_np implementation Date: Fri, 21 Jun 2019 14:18:38 -0400 Message-ID: <20190621181838.GY1506@brightrain.aerifal.cx> References: <20190621140459.GW1506@brightrain.aerifal.cx> Reply-To: musl@lists.openwall.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="197598"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Mutt/1.5.21 (2010-09-15) To: musl@lists.openwall.com Original-X-From: musl-return-14269-gllmg-musl=m.gmane.org@lists.openwall.com Fri Jun 21 20:18:54 2019 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by blaine.gmane.org with smtp (Exim 4.89) (envelope-from ) id 1heO7h-000pIf-RH for gllmg-musl@m.gmane.org; Fri, 21 Jun 2019 20:18:53 +0200 Original-Received: (qmail 13944 invoked by uid 550); 21 Jun 2019 18:18:51 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Original-Received: (qmail 13923 invoked from network); 21 Jun 2019 18:18:50 -0000 Content-Disposition: inline In-Reply-To: <20190621140459.GW1506@brightrain.aerifal.cx> Original-Sender: Rich Felker Xref: news.gmane.org gmane.linux.lib.musl.general:14253 Archived-At: On Fri, Jun 21, 2019 at 10:04:59AM -0400, Rich Felker wrote: > On Fri, Jun 21, 2019 at 01:36:49PM +0000, Poggiali, Antonio wrote: > > Hello, > > > > I've written the missing API pthread_getname_np for the latest version of the library. > > In attachment the patch to apply in on the master branch. > > > > I'd really like to see it integrated in the next release. > > I think this was brought up before and it was deemed not appropriate > for inclusion because there are multiple incompatible historical > functions by the same name. I'll see what I can find from past > discussions. It looks like: - AIX has it with no size argument. - QNX has it with an int size argument. - Blackberry has it with an int size argument. - PTC MKX has a char ** argument where it returns a pointer to the name and doesn't document the storage duration of the name. - OSF/1 defines it matching glibc. - OpenBSD defines it matching glibc. - NetBSD defines it matching glibc. - FreeBSD seems to lack both get and set (but has the differently-named pthread_set_name_np). - Solaris defines it matching glibc. So the situation is nasty, but not as bad as I remember. The conflicting definitions are basically junk (unusable) or minor gratuitous differences (int vs size_t). However this does suggest that there's a decent motivation for discouraging the proliferation of its use in applications. Thoughts? Rich