projects
/
musl
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
remove useless infinite loop from end of exit function
[musl]
/
src
/
time
/
timer_create.c
diff --git
a/src/time/timer_create.c
b/src/time/timer_create.c
index
2b4619d
..
b54a524
100644
(file)
--- 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);
}
weak_alias(dummy_1, __pthread_tsd_run_dtors);
+void __reset_tls();
+
static void cleanup_fromsig(void *p)
{
pthread_t self = __pthread_self();
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;
self->canceldisable = 0;
self->cancelasync = 0;
self->unblock_cancel = 0;
+ __reset_tls();
longjmp(p, 1);
}
longjmp(p, 1);
}
@@
-52,8
+55,6
@@
static void install_handler()
.sa_flags = SA_SIGINFO | SA_RESTART
};
__libc_sigaction(SIGTIMER, &sa, 0);
.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)
}
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) {
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);
}
__wait(&self->timer_id, 0, id, 1);
__syscall(SYS_timer_delete, id);
}