delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin-developers/2002/08/07/03:34:50

Mailing-List: contact cygwin-developers-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-developers-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin-developers/>
List-Post: <mailto:cygwin-developers AT cygwin DOT com>
List-Help: <mailto:cygwin-developers-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-developers-owner AT cygwin DOT com
Delivered-To: mailing list cygwin-developers AT cygwin DOT com
X-Authentication-Warning: atacama.four-d.de: mail set sender to <tpfaff AT gmx DOT net> using -f
Date: Wed, 7 Aug 2002 09:34:14 +0200 (=?ISO-8859-1?Q?Westeurop=E4ische_Sommerzeit?=)
From: Thomas Pfaff <tpfaff AT gmx DOT net>
To: cygwin-developers AT cygwin DOT com
Subject: Re: pthread_testcancel() causes SEGV
In-Reply-To: <20020806183632.GA1892@tishler.net>
Message-ID: <Pine.WNT.4.44.0208070927490.268-100000@algeria.intern.net>
X-X-Sender: pfaff AT antarctica DOT intern DOT net
MIME-Version: 1.0


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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019