This is the mail archive of the cygwin-patches@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]

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


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