X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=src%2Ftime%2Ftimer_create.c;h=b54a524ce85bb2e3ec97987bb3b017dc958d96f7;hb=5cc187215681c2fc1563ad5136c389249aa3f70e;hp=2b4619d4ac0738af94d5aceaddcd2afdd1664e3d;hpb=7356c2554e33cf16768616e8e3ae4a4f5a5aac17;p=musl diff --git a/src/time/timer_create.c b/src/time/timer_create.c index 2b4619d4..b54a524c 100644 --- a/src/time/timer_create.c +++ b/src/time/timer_create.c @@ -19,6 +19,8 @@ static void dummy_1(pthread_t self) } weak_alias(dummy_1, __pthread_tsd_run_dtors); +void __reset_tls(); + static void cleanup_fromsig(void *p) { pthread_t self = __pthread_self(); @@ -28,6 +30,7 @@ static void cleanup_fromsig(void *p) self->canceldisable = 0; self->cancelasync = 0; self->unblock_cancel = 0; + __reset_tls(); longjmp(p, 1); } @@ -52,8 +55,6 @@ static void install_handler() .sa_flags = SA_SIGINFO | SA_RESTART }; __libc_sigaction(SIGTIMER, &sa, 0); - __syscall(SYS_rt_sigprocmask, SIG_UNBLOCK, - SIGTIMER_SET, 0, _NSIG/8); } static void *start(void *arg) @@ -69,6 +70,8 @@ static void *start(void *arg) pthread_barrier_wait(&args->b); if ((id = self->timer_id) >= 0) { + __syscall(SYS_rt_sigprocmask, SIG_UNBLOCK, + SIGTIMER_SET, 0, _NSIG/8); __wait(&self->timer_id, 0, id, 1); __syscall(SYS_timer_delete, id); }