anchao commented on code in PR #18148:
URL: https://github.com/apache/nuttx/pull/18148#discussion_r2726748954
##########
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:
1. They should be submitted together.
2. Performance will degrade under amp.
3. CPU parameters could be removed.
--
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]