diff options
author | Rich Felker <dalias@aerifal.cx> | 2011-04-03 12:03:58 -0400 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2011-04-03 12:03:58 -0400 |
commit | f01d35184291c650f6a38f8b3da41693bfde0e70 (patch) | |
tree | 6ac03fcfbcde4312e0d97cfba474427e18e18089 /src/thread/pthread_create.c | |
parent | 06baa2b56cc64ec974f0dc6e67001d0cfa030826 (diff) | |
download | musl-f01d35184291c650f6a38f8b3da41693bfde0e70.tar.gz musl-f01d35184291c650f6a38f8b3da41693bfde0e70.tar.xz musl-f01d35184291c650f6a38f8b3da41693bfde0e70.zip |
simplify calling of timer signal handler
Diffstat (limited to 'src/thread/pthread_create.c')
-rw-r--r-- | src/thread/pthread_create.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/thread/pthread_create.c b/src/thread/pthread_create.c index 6f1bb0e8..d058a1ad 100644 --- a/src/thread/pthread_create.c +++ b/src/thread/pthread_create.c @@ -4,6 +4,7 @@ static void dummy_1(pthread_t self) { } weak_alias(dummy_1, __pthread_tsd_run_dtors); +weak_alias(dummy_1, __sigtimer_handler); #ifdef __pthread_unwind_next #undef __pthread_unwind_next @@ -47,13 +48,9 @@ static void docancel(struct pthread *self) static void cancel_handler(int sig, siginfo_t *si, void *ctx) { struct pthread *self = __pthread_self(); - if (!self->cancel) { - if (si->si_code == SI_TIMER && libc.sigtimer) - libc.sigtimer(sig, si, ctx); - return; - } - if (self->canceldisable) return; - if (self->cancelasync || (self->cancelpoint==1 && PC_AT_SYS(ctx))) + if (si->si_code == SI_TIMER) __sigtimer_handler(self); + if (self->cancel && !self->canceldisable && + (self->cancelasync || (self->cancelpoint==1 && PC_AT_SYS(ctx)))) docancel(self); } |