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


##########
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:
   We expect the following interfaces to be valid in all scenarios:
   rspin_lock_count
   rspin_lock_is_locked (to be added later)



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