pthread_testcancel() causes SEGV
Thomas Pfaff
tpfaff@gmx.net
Wed Aug 7 00:34:00 GMT 2002
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
More information about the Cygwin-developers
mailing list