diff --git a/sched/signal/sig_dispatch.c b/sched/signal/sig_dispatch.c index 1b5edb3ee3..7553c5d633 100644 --- a/sched/signal/sig_dispatch.c +++ b/sched/signal/sig_dispatch.c @@ -105,6 +105,13 @@ static int nxsig_queue_action(FAR struct tcb_s *stcb, siginfo_t *info) flags = enter_critical_section(); sq_addlast((FAR sq_entry_t *)sigq, &(stcb->sigpendactionq)); + + /* Then schedule execution of the signal handling action on the + * recipient's thread. SMP related handling will be done in + * up_schedule_sigaction() + */ + + up_schedule_sigaction(stcb, nxsig_deliver); leave_critical_section(flags); } } @@ -383,13 +390,6 @@ int nxsig_tcbdispatch(FAR struct tcb_s *stcb, siginfo_t *info) flags = enter_critical_section(); - /* Then schedule execution of the signal handling action on the - * recipient's thread. SMP related handling will be done in - * up_schedule_sigaction() - */ - - up_schedule_sigaction(stcb, nxsig_deliver); - /* Check if the task is waiting for an unmasked signal. If so, then * unblock it. This must be performed in a critical section because * signals can be queued from the interrupt level.