This code should have been members of the pthread class. I'm checking in such a variant.
Thanks again, Rob > -----Original Message----- > From: Thomas Pfaff [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, 24 April 2002 8:53 PM > To: [EMAIL PROTECTED] > Subject: [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 <[EMAIL PROTECTED]> > * 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. > >