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] reorganize list handling of fixable pthread objects


Reorganize the list handling of the pthreads objects by using the List
template class and remove a lot of duplicate code.


2002-02-28  Thomas Pfaff  <tpfaff at gmx dot net>

	* thread.h (class List): Move inline code inside of class
	declaration.
	(pthread_mutex::fixup_after_fork): Declare as static method.
	(pthread_mutex::FixupAfterFork(pthread_mutex*): New static method.
	(pthread_mutex::FixupAfterFork(void): New method.
	(pthread_mutex::mutexes): New static member.
	(pthread_cond::fixup_after_fork): Declare as static method.
	(pthread_cond::FixupAfterFork(pthread_cond*): New static method.
	(pthread_cond::FixupAfterFork(void): New method.
	(pthread_cond::conds): New static member.
	(pthread_rwlock::fixup_after_fork): Declare as static method.
	(pthread_rwlock::FixupAfterFork(pthread_rwlock*): New static
	method.
	(pthread_rwlock::FixupAfterFork(void): New method.
	(pthread_rwlock::rwlocks): New static member.
	(semaphore::fixup_after_fork): Declare as static method.
	(semaphore::FixupAfterFork(semaphore*): New static method.
	(semaphore::FixupAfterFork(void): New method.
	(semaphore::semaphores): New static member.
	(MTinterface::mutexs): Remove.
	(MTinterface::conds): Ditto.
	(MTinterface::rwlocks): Ditto.
	(MTinterface::semaphores): Ditto.
	(MTinterface::MTinterface): Remove initialization of removed
	member variables.
	* thread.cc (MTinterface::fixup_after_fork): Change
	fixup_after_fork for pthread objects.
	(pthread_cond::conds): Instantiate.
	(pthread_cond::pthread_cond): Use List::Insert rather than custom
	list code.
	(pthread_cond::~pthread_cond): Use List::Remove rather than custom
	list code.
	(pthread_cond::fixup:after_fork): Implement.
	(pthread_cond::FixupAfterFork): Rename old fixup_after_fork
	to FixupAfterFork.
	(pthread_rwlock::rwlocks): Instantiate.
	(pthread_rwlock::pthread_crwlock): Use List::Insert rather than
	custom list code.
	(pthread_rwlock::~pthread_rwlock): Use List::Remove rather than
	custom list code.
	(pthread_rwlock::fixup:after_fork): Implement.
	(pthread_rwlock::FixupAfterFork): Rename old fixup_after_fork
	to FixupAfterFork.
	(pthread_mutex::mutexes): Instantiate.
	(pthread_mutex::pthread_mutex): Use List::Insert rather than
	custom list code.
	(pthread_mutex::~pthread_mutex): Use List::Remove rather than
	custom list code.
	(pthread_mutex::fixup:after_fork): Implement.
	(pthread_mutex::FixupAfterFork): Rename old fixup_after_fork
	to FixupAfterFork.
	(semaphore::conds): Instantiate.
	(semaphore::semaphore): Use List::Insert rather than custom list
	code.
	(semaphores::~semaphore): Use List::Remove rather than custom list
	code.
	(semaphore::fixup:after_fork): Implement.
	(semaphore::FixupAfterFork): Rename old fixup_after_fork to
	FixupAfterFork.



Attachment: pthread_fixups.patch
Description: Text document


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