[PATCH] pthread cleanup_push,_pop fixes
Thomas Pfaff
tpfaff@gmx.net
Wed Apr 24 03:53:00 GMT 2002
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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pthread_cleanup.patch
Type: application/octet-stream
Size: 4574 bytes
Desc:
URL: <http://cygwin.com/pipermail/cygwin-patches/attachments/20020424/40480f94/attachment.obj>
More information about the Cygwin-patches
mailing list