run pthread tsd destructors when a timer thread pretends to exit

This commit is contained in:
Rich Felker 2011-04-09 02:26:55 -04:00
parent 82171d6ac0
commit 2063c4cac2
1 changed files with 6 additions and 0 deletions

View File

@ -13,11 +13,17 @@ struct start_args {
struct sigevent *sev;
};
static void dummy_1(pthread_t self)
{
}
weak_alias(dummy_1, __pthread_tsd_run_dtors);
static void cleanup_fromsig(void *p)
{
pthread_t self = __pthread_self();
self->cancel = 0;
self->cancelbuf = 0;
__pthread_tsd_run_dtors(self);
longjmp(p, 1);
}