xiaoxiang781216 commented on code in PR #16333: URL: https://github.com/apache/nuttx/pull/16333#discussion_r2077002464
########## sched/signal/sig_dispatch.c: ########## @@ -110,18 +110,15 @@ static int sig_handler(FAR void *cookie) * ****************************************************************************/ -static int nxsig_queue_action(FAR struct tcb_s *stcb, siginfo_t *info) +static int nxsig_queue_action(FAR struct tcb_s *stcb, + FAR sigactq_t *sigact, + siginfo_t *info) Review Comment: add FAR ########## sched/signal/sig_dispatch.c: ########## @@ -435,6 +473,14 @@ int nxsig_tcbdispatch(FAR struct tcb_s *stcb, siginfo_t *info) flags = enter_critical_section(); + /* Make sure that there is always at least one sigpednq and sigq structure + * available, in case one needs to be queued later. Note that this breaks + * the critical section if it needs to allocate any new structures. So it + * needs to be done here before using the task state or sigprocmask. + */ + + flags = nxsig_alloc_dyn_pending(flags); Review Comment: move not move before line 474 and let nxsig_alloc_dyn_pending do the protection by self? -- 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: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org