waveXxReset: strace reports thread 'unknown'

Christopher Faylor cgf@alum.bu.edu
Sat May 8 02:38:00 GMT 2004


On Fri, May 07, 2004 at 05:44:10PM -0500, Brian Ford wrote:
>On Sat, 8 May 2004, Gerd Spalink wrote:
>
>> My question is: Should I be concerned and is there a hidden bug in the
>> file handler, or can someone tell me what this thread is?
>
>You probably shouldn't be concerned.  I can't say what that thread is, but
>if your speculation below is correct, I can say why it's there.
>
>> I could imagine that the waveXxOpen functions start some thread, which
>> is terminated by waveXxReset. But I have no idea why this ends up in
>> _cygtls::remove.
>
>All threads, Windows or Cygwin, go through a hook (threadfunc_fe) that
>gives them a thread local storage object at the base (approximately) of
>their stack.  When they die, the destructor for that object is called.
>
>(I hope I got that close to right.)

It's not really a destructor in the classic sense but you are correct.
Cygwin knows about every thread that gets created and attempts to remove
a thread from the list of threads which are signalable when the thread
exits.  Unless you've gone out of your way to give the thread a name (and
there is no reason to do so) it will show up as unknown.

cgf



More information about the Cygwin-developers mailing list