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]

Re: Pthreads patches


Hi Rob,

i had a minor problem with your latest code:
You decided to change the mutex pointer into an object. This will break
the verifyable_object_isvalid call in pthread::create.

I have attached a small patch, a cancellation patch will follow.

Thomas

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

	* thread.h (pthread::cleanup_stack): Renamed cleanup_handlers to
	cleanup_stack.
	* thread.cc (pthread::pthread): Ditto.
	(pthread::create): Fixed mutex verification.
	(pthread::push_cleanup_handler): Renamed cleanup_handlers to
	cleanup_stack.
	Mutex calls removed, used InterlockedExchangePointer instead.
	(pthread::pop_cleanup_handler): Renamed cleanup_handlers to
	cleanup_stack.
	(pthread::pop_all_cleanup_handlers): Ditto.
	(__pthread_once): Check state first and return if already done.
	(__pthread_join): DEADLOCK test reverted to __pthread_equal call.
	(__pthread_detach): Unlock mutex before deletion.


On Mon, 10 Jun 2002, Robert Collins wrote:

> I've still got 4 pthread patches from Thomas to review, but I've got
to
> go out for a while.
>
> **WARNING** I have code reviewed, but not regression tested these
> changes. Thomas, could you merge your current sandbox with the latest
> changes and ensure I haven't broken any of your patches ? Also, I've
> probably caused the remaining patches to apply badly - if you have the
> time, it would help me if you could regenerate the patches against
CVS.
>
> I should get the remaining code reviewed today sometime.
>
> Rob
>




Attachment: pthread_fix.patch
Description: Binary data


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