jlaitine commented on code in PR #17263: URL: https://github.com/apache/nuttx/pull/17263#discussion_r2481226720
########## 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: Yes; but I don't see how it becomes simpler. You'll need to anyhow check that the memory allocations succeeds, and this results a lot more if's than just re-checking if there are items in the queue after calling the allocation function. I'll push a temporary patch on top to show what I mean; it is fine by me, I can squash it if you like it better. Or perhaps I don't just understand how you can make it simpler? -- 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]
