xiaoxiang781216 commented on code in PR #17263: URL: https://github.com/apache/nuttx/pull/17263#discussion_r2480347907
########## sched/signal/sig_dispatch.c: ########## @@ -487,6 +486,17 @@ int nxsig_tcbdispatch(FAR struct tcb_s *stcb, siginfo_t *info, flags = nxsig_alloc_dyn_pending(flags); + /* If there are no available items for pending signals, and this was a + * real-time signal called from interrupt or idle task, return with + * -EAGAIN. + */ + + if (sq_empty(&g_sigpendingsignal) || sq_empty(&g_sigpendingaction)) Review Comment: could you try my suggestion which is more simple to recheck the pending list again? ########## sched/signal/sig_dispatch.c: ########## @@ -487,6 +486,17 @@ int nxsig_tcbdispatch(FAR struct tcb_s *stcb, siginfo_t *info, flags = nxsig_alloc_dyn_pending(flags); + /* If there are no available items for pending signals, and this was a + * real-time signal called from interrupt or idle task, return with + * -EAGAIN. + */ + + if (sq_empty(&g_sigpendingsignal) || sq_empty(&g_sigpendingaction)) Review Comment: @jlaitine could you try my suggestion which is more simple to recheck the pending list again? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
