[PATCH] pthread_cond_init

Thomas Pfaff tpfaff@gmx.net
Fri Nov 29 04:13:00 GMT 2002

Rob has added a native mutex around mutex initialization to avoid a
race. This is required in pthread_cond_init too.

I have moved the nativeMutex class outside of pthread_mutex and added
similar calls to pthread_cond to avoid that race.


2002-11-29  Thomas Pfaff  <tpfaff@gmx.net>

	* pthread.cc (pthread_cond_init): Use new pthread_cond::init.
	* thread.cc: Some white spaces cleanups.
	Change __pthread_cond_init to pthread_cond::init throughout.
	(nativeMutex): Move class methods outside pthread_mutex.
	(MTinterface::Init): Initialize pthread_cond init lock.
	(pthread_cond::condInitializationLock): Instantiate.
	(pthread_cond::initMutex): New Method.
	(pthread_cond::isGoodInitializerOrBadObject): Ditto.
	* thread.h: Some white spaces cleanups.
	(nativeMutex): Move class declaration outside pthread_mutex.
	(pthread_cond::condInitializationLock): New static member.
	(pthread_cond::initMutex): New Method.
	(pthread_cond::isGoodInitializerOrBadObject): Ditto.
	(__pthread_cond_init): Remove prototype.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: pthread_cond_init.patch
URL: <http://cygwin.com/pipermail/cygwin-patches/attachments/20021129/f2f4800b/attachment.ksh>

More information about the Cygwin-patches mailing list