Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20190621181838.GY1506@brightrain.aerifal.cx>
Date: Fri, 21 Jun 2019 14:18:38 -0400
From: Rich Felker <dalias@...c.org>
To: musl@...ts.openwall.com
Subject: Re: pthread_getname_np implementation

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

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.