TaiJuWu commented on code in PR #10776:
URL: https://github.com/apache/nuttx/pull/10776#discussion_r1348687786


##########
sched/semaphore/spinlock.c:
##########
@@ -32,6 +32,11 @@
 #include <nuttx/sched_note.h>
 #include <arch/irq.h>
 
+#ifdef CONFIG_RW_SPINLOCK
+#  include <stdatomic.h>
+const static rwlock_t zero = SP_UNLOCKED;

Review Comment:
   The variable is used at read_lock, write_lock,read_trylock....
   In many case, we will use it so I think it should be static global variable.



-- 
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: commits-unsubscr...@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to