Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Date: Wed, 15 Oct 2003 12:11:14 +0200
From: Corinna Vinschen <corinna-cygwin@cygwin.com>
To: cygwin@cygwin.com
Subject: Re: Is multithreaded profiling on cygwin possible?
Message-ID: <20031015101114.GN14344@cygbert.vinschen.de>
Reply-To: cygwin@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
References: <20031015095731.14509.qmail@linuxmail.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20031015095731.14509.qmail@linuxmail.org>
User-Agent: Mutt/1.4.1i

On Wed, Oct 15, 2003 at 05:57:31PM +0800, peter garrone wrote:
> Brian Ford wrote:
> >On Tue, 14 Oct 2003, peter garrone wrote:
> >> A list of active threads is maintained. A thread calling moncontrol(1) gets
> >> put in the list. When a call to SuspendThread fails, the thread is assumed
> >> to be defunct and taken off the list.
> >>
> >Seems reasonable.
> >
> >I guess I was originally thinking "just profile all threads all the
> >time", but I guess you method is more flexable.  That could
> >probably be an option somehow after you polish this up.
> 
> There is no other way to detect a dead thread. Nothing like "atexit" or
> anything I could find anyway in the win32 api, of which my experience
> is limited, and ordinary.

WaitForSingleObject and friends.  A terminated thread is in signalled
state.

Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Developer                                mailto:cygwin@cygwin.com
Red Hat, Inc.

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

