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


##########
include/nuttx/spinlock.h:
##########
@@ -32,6 +32,14 @@
 
 #include <nuttx/irq.h>
 
+#ifdef CONFIG_RW_SPINLOCK
+#include <stdatomic.h>
+typedef atomic_int rwlock_t;

Review Comment:
   It can't.
   There will be a error if we use normal type on Build / macOS (sim-02) 
   ```
   (error: address argument to atomic operation must be a pointer to _Atomic 
type ('volatile rwlock_t *' (aka 'volatile int *') invalid))
   ```
   
   So I used atomic type in the second commit of this PR but it seems not to 
work.
   



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