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]

[PATCH] pthread_cond_init


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

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.

Attachment: pthread_cond_init.patch
Description: Text document


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