This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: Posix Thread name
- From: Andrew Lunn <andrew at lunn dot ch>
- To: Tony Butt <tjb at cea dot com dot au>
- Cc: ecos-discuss at ecos dot sourceware dot org
- Date: Thu, 13 May 2004 16:01:14 +0200
- Subject: Re: [ECOS] Posix Thread name
- References: <002b01c43185$47eb7080$270210ac@cea.com.au>
On Tue, May 04, 2004 at 01:09:57PM +1000, Tony Butt wrote:
> I had a requirement to be able to explicitly set the name of a posix thread,
> made some simple changes to posix/current/src/pthread.cxx and
> posix/current/include/types.h, and can now optionally set the name of a
> posix thread created using pthread_create.
>
> The name is set by assigning a value to pthread_attr.name before calling
> pthread_create().
As far as i can see, there is nothing in the POSIX pthread standard
like this.
Even if there was, i doubt it would be done by directly modifying the
pthread_attr structure. I would expect the POSIX people to add two new
functions, pthread_attr_setname() and pthread_attr_getname().
I think adding arbitry extensions like this to a standardized API is a
bad idea. So im tempted to not accept this contribution. Feel free to
try to change my mind.
Andrew
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss