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 cleanup_push,_pop fixes


This patch will fix the cleanup_push/pop implementation. It is required
that the pushed handlers will run when a thread exits or is cancelled, but
this did not happen.
This patch is incremental to my previous patches.

Greetings,
Thomas

2002-04-24  Thomas Pfaff  <tpfaff@gmx.net>
	* include/pthread.h (__pthread_cleanup_handler): New structure
	(pthread_cleanup_push): Rewritten.
	(pthread_cleanup_pop): Ditto.
	(_pthread_cleanup_push): New prototype
	(_pthread_cleanup_pop) Ditto.
	* pthread.cc: (_pthread_cleanup_push) New function.
	(_pthread_cleanup_pop): Ditto.

	* thread.h (__pthread_cleanup_push): New prototype
	(__pthread_cleanup_pop): Ditto.
	(__pthread_cleanup_pop_all): Ditto.
	(pthread::cleanup_handlers): New member.
	* thread.cc (__pthread_cleanup_push): New function.
	(__pthread_cleanup_pop): Ditto.
	(__pthread_cleanup_pop_all): Ditto.
	(__pthread_exit): Run cleanup handlers on exit.

	* cygwin.din: Add _pthread_cleanup_push and _pthread_cleanup_pop.

Attachment: pthread_cleanup.patch
Description: Binary data


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