anchao commented on code in PR #17939:
URL: https://github.com/apache/nuttx/pull/17939#discussion_r2695733302
##########
include/nuttx/notifier.h:
##########
@@ -212,9 +213,9 @@ extern "C"
{ \
FAR struct atomic_notifier_head *nh = (nhead); \
irqstate_t flags; \
- flags = enter_critical_section(); \
+ flags = spin_lock_irqsave_nopreempt(&nh->lock); \
Review Comment:
There's a flaw in this design. If I attempt to unregister the callback
function within a chained callback, a deadlock will occur.
--
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]