This is the mail archive of the
cygwin-patches@cygwin.com
mailing list for the Cygwin project.
Recent changes in pthread_create
- From: "Thomas Pfaff" <tpfaff at gmx dot net>
- To: cygwin-patches at cygwin dot com
- Date: Wed, 21 Apr 2004 09:18:11 +0200 (MEST)
- Subject: Recent changes in pthread_create
Chris,
i am not so happy with the recent changes to pthread_create and
pthread::init_wrapper.
They remind my of a bug that i have fixed about 2 years ago:
From: Thomas Pfaff <tpfaff@gmx.net>
To: cygwin-patches@cygwin.com
Subject: [PATCH] minor pthread fixes
Date: Thu, 18 Apr 2002 12:11:26 +0200
[...]
2. The InterlockedIncrement (&MT_INTERFACE->threadcount) in
__pthread_create is misplaced. If the newly created thread terminates
fast enough the threadcount will be decremented before it was
incremented, which will result in an exit from __pthread_exit instead
of an ExitThread.
[... ]
Same thing will now happen again after your change from CREATE_SUSPENDED to
0 in CreateThread.
Thomas
--
"Sie haben neue Mails!" - Die GMX Toolbar informiert Sie beim Surfen!
Jetzt aktivieren unter http://www.gmx.net/info