Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 3 additions & 18 deletions sched/signal/sig_dispatch.c
Original file line number Diff line number Diff line change
Expand Up @@ -372,14 +372,9 @@ int nxsig_tcbdispatch(FAR struct tcb_s *stcb, siginfo_t *info)
if (masked == 1)
#endif
{
#ifdef CONFIG_LIB_SYSCALL
/* If the thread is in syscall, schedule the sigaction here */
/* Add signal to pending queue regardless. */

if ((stcb->flags & TCB_FLAG_SYSCALL) != 0)
{
nxsig_add_pendingsignal(stcb, info);
}
#endif
nxsig_add_pendingsignal(stcb, info);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When FLAT build.
Shouldn't call nxsig_add_pendingsignal() when stcb->task_state == TSTATE_WAIT_SIG.


/* Check if the task is waiting for this pending signal. If so, then
* unblock it. This must be performed in a critical section because
Expand Down Expand Up @@ -411,19 +406,9 @@ int nxsig_tcbdispatch(FAR struct tcb_s *stcb, siginfo_t *info)
{
up_switch_context(stcb, rtcb);
}

leave_critical_section(flags);
}

/* Its not one we are waiting for... Add it to the list of pending
* signals.
*/

else
{
leave_critical_section(flags);
nxsig_add_pendingsignal(stcb, info);
}
leave_critical_section(flags);
}

/************************* UNMASKED SIGNAL ACTIONS ************************/
Expand Down