Pthreads patches

Thomas Pfaff tpfaff@gmx.net
Wed Jun 12 04:17:00 GMT 2002


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
>




-------------- next part --------------
A non-text attachment was scrubbed...
Name: pthread_fix.patch
Type: application/octet-stream
Size: 4262 bytes
Desc: 
URL: <http://cygwin.com/pipermail/cygwin-patches/attachments/20020612/421b8f47/attachment.obj>


More information about the Cygwin-patches mailing list