[PATCH] pthread_cond_init

Thomas Pfaff tpfaff@gmx.net
Tue Dec 10 05:48:00 GMT 2002


The patch has been made a little smaller and better readable by not
changing the functions order in thread.cc

2002-12-10  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.


On Fri, 29 Nov 2002, Thomas Pfaff wrote:

>
> 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.
>
> Thomas
>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: pthread_cond_init.patch
URL: <http://cygwin.com/pipermail/cygwin-patches/attachments/20021210/6f1b640e/attachment.ksh>


More information about the Cygwin-patches mailing list