Subject: pthread_t first/initial/primary test
To: None <netbsd-users@netbsd.org>
From: Tyler Retzlaff <rtr@netbsd.org>
List: netbsd-users
Date: 08/12/2003 00:17:49
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?

Thanks

-- 

Tyler Retzlaff <rtr@netbsd.org> http://www.netbsd.org