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.

Attachment: pthread_cleanup.patch
Description: Binary data

Reply via email to