This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git
The following commit(s) were added to refs/heads/master by this push:
new 0e44666828 signal/sig_dispatch: Signal action was not performed if
TCB_FLAG_SYSCALL is set
0e44666828 is described below
commit 0e4466682888cf32ca661aa04c649a836860a22f
Author: Ville Juven <[email protected]>
AuthorDate: Fri Feb 17 13:41:31 2023 +0200
signal/sig_dispatch: Signal action was not performed if TCB_FLAG_SYSCALL is
set
For some reason the signal action was never performed if the receiveing
task was within a system call, the pending queue inser was simply missing.
This fixes the issue.
---
sched/signal/sig_dispatch.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/sched/signal/sig_dispatch.c b/sched/signal/sig_dispatch.c
index 77d0c5ef71..9b926667a6 100644
--- a/sched/signal/sig_dispatch.c
+++ b/sched/signal/sig_dispatch.c
@@ -372,6 +372,15 @@ 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 */
+
+ 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
* unblock it. This must be performed in a critical section because
* signals can be queued from the interrupt level.