jlaitine commented on code in PR #17263:
URL: https://github.com/apache/nuttx/pull/17263#discussion_r2476528890
##########
sched/signal/sig_dispatch.c:
##########
@@ -364,10 +364,6 @@ static irqstate_t nxsig_alloc_dyn_pending(irqstate_t flags)
bool alloc_signal = sq_empty(&g_sigpendingsignal);
bool alloc_sigact = sq_empty(&g_sigpendingaction);
- /* Signals are not dispatched from the idle task */
-
- DEBUGASSERT(!sched_idletask());
Review Comment:
That's right... let's move the DEBUGASSERT inside the "if" instead of
removing it!
Or rather, return the calling function with -EAGAIN; this is much more
appropriate than just asserting.
For example linux does this for tgkill; from the man page:
```
ERRORS
EAGAIN The RLIMIT_SIGPENDING resource limit was reached and sig is a
real-time signal.
EAGAIN Insufficient kernel memory was available and sig is a
real-time signal.
```
I'll update the PR. Thanks for pointing this out.
--
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]