anchao commented on code in PR #14578:
URL: https://github.com/apache/nuttx/pull/14578#discussion_r1825389505


##########
include/nuttx/spinlock.h:
##########
@@ -529,6 +529,7 @@ irqstate_t spin_lock_irqsave_wo_note(FAR volatile 
spinlock_t *lock)
 {
   irqstate_t ret;
   ret = up_irq_save();
+  sched_lock_wo_note();

Review Comment:
   Yes, you are right. it will trigger deadlock If access the spinlock in 
interrupt handler, but RT model should reduce the interrupt disable phase as 
much as possible. I think it may be necessary to implement a set of independent 
APIs to prohibit developers from using them in interrupt handler, this might be 
another topic.



-- 
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]

Reply via email to