This is the mail archive of the
cygwin-developers@cygwin.com
mailing list for the Cygwin project.
Re: pthread_testcancel() causes SEGV
- From: Thomas Pfaff <tpfaff at gmx dot net>
- To: cygwin-developers at cygwin dot com
- Date: Wed, 7 Aug 2002 09:34:14 +0200 (Westeuropäische Sommerzeit)
- Subject: Re: pthread_testcancel() causes SEGV
On Tue, 6 Aug 2002, Jason Tishler wrote:
> I annotated pthread::self() as follows:
>
> pthread *
> pthread::self ()
> {
> pthread *p = (pthread *) TlsGetValue
> (MT_INTERFACE->thread_self_dwTlsIndex);
> debug_printf ("pthread::self: p = %x, i = %ld", p,
> MT_INTERFACE->thread_self_dwTlsIndex);
> return p;
> }
>
> When starting ipc-daemon, I get the following:
>
> 87 3097903 [unknown (0xD8C)] ipc-daemon 920 pthread::self:
> pthread::self: p = 0, i = 4
>
> instead of something like the following (from a non-SCM test case):
>
> 85 121609 [main] open 2504 pthread::self: pthread::self: p =
> 610CD61C, i = 4
>
This seems to a problem with all treads that are not the mainthread nor
created by pthread_create.
I will enhance pthread_self to automatically create a pointer to the
pthread class if it is not present.
Thanks for tracking it down.
Thomas