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


##########
include/nuttx/spinlock.h:
##########
@@ -605,7 +605,14 @@ irqstate_t rspin_lock_irqsave(FAR rspinlock_t *lock)
   return flags;
 }
 #else
-#  define rspin_lock_irqsave(l) ((void)(l), up_irq_save())
+static inline_function
+irqstate_t rspin_lock_irqsave(FAR rspinlock_t *lock)
+{
+  irqstate_t flags = up_irq_save();
+  lock->count++;

Review Comment:
   why we still need count and owner update if disable SPINLOCK?



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