signal: Don't do schedule_sigaction when there is no action

Signed-off-by: ligd <liguiding1@xiaomi.com>
This commit is contained in:
ligd 2022-01-25 12:14:12 +08:00 committed by Masayuki Ishikawa
parent a98a599cb9
commit 0c1f63625a
1 changed files with 7 additions and 7 deletions

View File

@ -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.