[PATCH] pthread_mutex patches

Thomas Pfaff tpfaff@gmx.net
Wed Dec 11 04:36:00 GMT 2002

The patch has been regenerated due to the changes in the cond_init patch
and to fix the return codes in __pthread_mutex_lock, _trylock and _unlock.

I already modified some of the pthreads-win32 testcases and will sent them
as soon as i got on ok for an incorporation in cygwin from the
pthreads-win32 maintainer.

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

	* include/pthread.h: Add define for errorchecking mutexes.
	Change default mutex type.
	* thread.cc (pthread_cond::TimedWait): Update mutex unlock
	(pthread_mutex::pthread_mutex): New implement.
	(pthread_mutex::~pthread_mutex): Ditto.
	(pthread_mutex::Lock): Ditto.
	(pthread_mutex::TryLock): Ditto.
	(pthread_mutex::UnLock): Ditto.
	(pthread_mutex::Destroy): Implement new method.
	(pthread_mutex::SetOwner): Ditto.
	(pthread_mutex::LockRecursive): Ditto.
	(pthread_mutex::fixup_after_fork): Restore locking state after
	(__pthread_mutex_lock): Return pthread_mutex::Lock errorcode.
	(__pthread_mutex_trylock): Return pthread_mutex::TryLock
	(__pthread_mutex_unlock): Return pthread_mutex::UnLock errorcode.
	(__pthread_mutex_destroy): Call pthread_mutex::Destroy to destroy
	(__pthread_mutexattr_settype): Allow errorchecking and recursive
	* thread.h (MUTEX_LOCK_COUNTER_INITIAL): New define.
	(pthread_mutex::criticalsection): Remove.
	(pthread_mutex::lock_counter): New member.
	(pthread_mutex::recursion_counter): Ditto.
	(pthread_mutex::owner): Ditto.
	(pthread_mutex::type): Ditto.
	(pthread_mutex::Destroy): New method.
	(pthread_mutex::SetOwner): Ditto.
	(pthread_mutex::LockRecursive): Ditto.

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: pthread_mutex.patch
URL: <http://cygwin.com/pipermail/cygwin-patches/attachments/20021211/42bb7896/attachment.ksh>

More information about the Cygwin-patches mailing list