This is the mail archive of the cygwin-developers@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]