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] |
Pthread key destructor handling revised. IMHO it does not make sense to handle two lists with keys, one with all keys, one with its destructors. The destructors are now part of the key class. 2002-08-16 Thomas Pfaff <tpfaff@gmx.net> * init.cc (dll_entry): Remove FIXME block. Call MTinterface::on_thread_detach on DLL_THREAD_DETACH and on DLL_PROCESS_DETACH for the last terminating thread. * thread.cc (pthread_key_destructor) Remove all methods. (pthread_key_destructor_list): Ditto. (MT_INTERFACE): Move define to thread.h (MTinterface::on_thread_detach): Walk through keys list and run its value destructors. (pthread::exit): Remove MT_INTERFACE->destructors.IterateNull call. Key destructors are now run on thread detach. (pthread_key::pthread_key): Initialize destructor function pointer. Remove old destructor handling. (pthread_key::~pthread_key): Remove old destructor handling. (pthread_key::run_dtors): Run key destructors if defined and the value is not NULL. * thread.h (pthread_key::destructor): New member. (pthread_key::run_dtors): New method. (pthread_key_destructor) Remove class. (pthread_key_destructor_list): Ditto. (MTinterface::destructors): Remove member. (MTinterface::on_thread_detach): New method. MT_INTERFACE: Move from thread.cc to this location.
Attachment:
pthread_key_destructor.patch
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |