This is the mail archive of the
mailing list for the Cygwin project.
[PATCH] pthread_key patch
- From: Thomas Pfaff <tpfaff at gmx dot net>
- To: cygwin-patches at cygwin dot com
- Date: Fri, 5 Jul 2002 08:50:21 +0200 (Westeuropäische Sommerzeit)
- Subject: [PATCH] pthread_key patch
If somebody is interested why if find this patch neccessary with a posix
threaded gcc could read
At least the changes in pthread_key::get should be applied, peoble would
be very surprised if the value of errno or Win32LastError will be set to 0
behind her back.
2002-07-05 Thomas Pfaff <email@example.com>
* init.cc (dll_entry): Run the pthread_key destructors on thread
and process detach. This will make sure that regardless a thread
is created with pthread_create or CreateThread its eh context
will be freed.
* thread.cc: Moved #define MT_INTERFACE from thread.cc to
destructor only if value is not NULL.
(pthread_key::get): Save and restore WIN32 LastError to avoid
that Lasterror is cleared in the exception handling code.
set_errno (0) removed.
(__pthread_exit): Removed IterateNull call. This will be done
during thread detach.
* thread.h (pthread::cleanup_stack): Moved #define MT_INTERFACE
user_data->threadinterface from thread.cc to this location.