This is the mail archive of the
pthreads-win32@sources.redhat.com
mailing list for the pthreas-win32 project.
pthread_self inside thread procedure
- From: Will Bryant <will dot bryant at ecosm dot com>
- To: pthreads-win32 at sources dot redhat dot com
- Date: Fri, 19 Nov 2004 15:09:39 +1300
- Subject: pthread_self inside thread procedure
Hi all,
With the new release, I'm finding that my threads can't detach; at the
very start of the thread procedure, they do a
pthread_detach(pthread_self()).
This call is returning ESRCH, because while pthread_self() is returning
a valid pthread_t structure, the first element of it is always NULL (the
second member is consistently a fairly high number, eg. 2312903, but
that may not have any significance).
So, unless I'm missing something, it seems that pthread_self() is broken
with the new release. Can others reproduce this problem?
Best regards,
Will
--
Will Bryant
Systems Architect, eCOSM.
Phone +64 3 365 4176 | Mobile +64 21 655 443
http://www.ecosm.com/