[ECOS] thread name

Wade Jensen waj4news@cox.net
Fri Jun 7 11:39:00 GMT 2002


I was hopping for a standard way to do this, but I guess there isn't one.

I just want to display the names for debugging.  I know that adding such a
routine would make the code non-portable (just like
pthread_measure_stack_usage), but my only other choice it to use the
cyg_thread name which is even less portable.

Thanks for the reply.

- Wade

----- Original Message -----
From: "Nick Garnett" <nickg@calivar.demon.co.uk>
To: "Wade Jensen" <waj4news@cox.net>
Cc: <ecos-discuss@sources.redhat.com>
Sent: Friday, June 07, 2002 11:20 AM
Subject: Re: [ECOS] thread name


> "Wade Jensen" <waj4news@cox.net> writes:
>
> > Hello,
> >
> > There is a thread name buffer in pthread_info, but there doesn't seem to
be
> > a good way to access the name.  I am considering adding some type of
> > pthread_setname() and pthread_getname() functions to do this.
> >
> > Is there currently a way to do this that I am missing?
> >
> > If not, is there a standard pthread function that I should implement
rather
> > than making my own?
> >
>
> The thread names are really only present for debugging. Some versions
> of GDB can fetch this information and display it when doing an "info
> threads" command. They are not used for anything else.
>
> POSIX has no concept of thread names. I don't really see any need to
> add anything to support it. It would only make any code that used it
> non-portable.
>
> But if you really need the names, feel free to go ahead.
>
> --
> Nick Garnett - eCos Kernel Architect
>
>


-- 
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss



More information about the Ecos-discuss mailing list