diff --git a/sched/sched/sched_suspend.c b/sched/sched/sched_suspend.c index e9934940f33..cc1c9dc5495 100644 --- a/sched/sched/sched_suspend.c +++ b/sched/sched/sched_suspend.c @@ -36,6 +36,7 @@ #include "sched/sched.h" #include "sched/queue.h" +#include "signal/signal.h" #ifdef CONFIG_SMP /**************************************************************************** @@ -102,11 +103,24 @@ void nxsched_suspend(FAR struct tcb_s *tcb) { irqstate_t flags; bool switch_needed; + FAR sq_entry_t *entry; DEBUGASSERT(tcb != NULL); flags = enter_critical_section(); + /* Check if received SIGCONT */ + + sq_for_every(&tcb->sigpendactionq, entry) + { + FAR sigq_t *sigq = (FAR sigq_t *)entry; + if (sigq->info.si_signo == SIGCONT) + { + leave_critical_section(flags); + return; + } + } + /* Check the current state of the task */ if (tcb->task_state >= FIRST_BLOCKED_STATE &&