mirror of
https://github.com/fluencelabs/musl
synced 2025-06-30 15:11:55 +00:00
run pthread tsd destructors when a timer thread pretends to exit
This commit is contained in:
@ -13,11 +13,17 @@ struct start_args {
|
|||||||
struct sigevent *sev;
|
struct sigevent *sev;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static void dummy_1(pthread_t self)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
weak_alias(dummy_1, __pthread_tsd_run_dtors);
|
||||||
|
|
||||||
static void cleanup_fromsig(void *p)
|
static void cleanup_fromsig(void *p)
|
||||||
{
|
{
|
||||||
pthread_t self = __pthread_self();
|
pthread_t self = __pthread_self();
|
||||||
self->cancel = 0;
|
self->cancel = 0;
|
||||||
self->cancelbuf = 0;
|
self->cancelbuf = 0;
|
||||||
|
__pthread_tsd_run_dtors(self);
|
||||||
longjmp(p, 1);
|
longjmp(p, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user