mirror of
https://github.com/apache/nuttx.git
synced 2026-06-02 01:21:26 +08:00
Revert "signal/sig_dispatch: Fix case where signal action is sent twice"
This reverts commit be0cb4cbe3.
This commit is contained in:
committed by
Alin Jerpelea
parent
62661600b2
commit
3f529b4882
@@ -372,9 +372,14 @@ int nxsig_tcbdispatch(FAR struct tcb_s *stcb, siginfo_t *info)
|
|||||||
if (masked == 1)
|
if (masked == 1)
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
/* Add signal to pending queue regardless. */
|
#ifdef CONFIG_LIB_SYSCALL
|
||||||
|
/* If the thread is in syscall, schedule the sigaction here */
|
||||||
|
|
||||||
nxsig_add_pendingsignal(stcb, info);
|
if ((stcb->flags & TCB_FLAG_SYSCALL) != 0)
|
||||||
|
{
|
||||||
|
nxsig_add_pendingsignal(stcb, info);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Check if the task is waiting for this pending signal. If so, then
|
/* Check if the task is waiting for this pending signal. If so, then
|
||||||
* unblock it. This must be performed in a critical section because
|
* unblock it. This must be performed in a critical section because
|
||||||
@@ -406,9 +411,19 @@ int nxsig_tcbdispatch(FAR struct tcb_s *stcb, siginfo_t *info)
|
|||||||
{
|
{
|
||||||
up_switch_context(stcb, rtcb);
|
up_switch_context(stcb, rtcb);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
leave_critical_section(flags);
|
||||||
}
|
}
|
||||||
|
|
||||||
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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/************************* UNMASKED SIGNAL ACTIONS ************************/
|
/************************* UNMASKED SIGNAL ACTIONS ************************/
|
||||||
|
|||||||
Reference in New Issue
Block a user