Subject: Re: pthread_t first/initial/primary test
To: None <netbsd-users@netbsd.org>
From: Christos Zoulas <christos@zoulas.com>
List: netbsd-users
Date: 08/11/2003 14:30:59
In article <20030811141749.GH18429@splode.eterna.com.au>,
Tyler Retzlaff <rtr@netbsd.org> wrote:
>Just a quick question about our native libpthread implementation.
>
>Is there a way to test whether or not the currently executing thread is the
>initial/primary thread? (That being the thread `first' internally in our
>pthread_init()).
>
>The only way I know how is to use pthread_self() before creating any other
>threads and then comparing the result to later pthread_self() calls. I'd
>rather not have to do it this way is there a simpler/better way?
>
looks like you need pthread_main_np()....
christos