mirror of
https://github.com/fluencelabs/musl
synced 2025-07-04 09:02:02 +00:00
use a separate signal from SIGCANCEL for SIGEV_THREAD timers
otherwise we cannot support an application's desire to use asynchronous cancellation within the callback function. this change also slightly debloats pthread_create.c.
This commit is contained in:
@ -10,7 +10,6 @@ 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
|
||||
@ -54,7 +53,6 @@ static void docancel(struct pthread *self)
|
||||
static void cancel_handler(int sig, siginfo_t *si, void *ctx)
|
||||
{
|
||||
struct pthread *self = __pthread_self();
|
||||
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);
|
||||
|
Reference in New Issue
Block a user