xiaoxiang781216 commented on code in PR #10605:
URL: https://github.com/apache/nuttx/pull/10605#discussion_r1333362903


##########
arch/arm64/include/spinlock.h:
##########
@@ -83,6 +83,25 @@
  * -- Clear Exclusive access monitor (CLREX) This is used to
  *     clear the state of the Local Exclusive Monitor.
  */
+#if defined(CONFIG_TICKET_SPINLOCK)
+#include <stdatomic.h>
+
+/* Memory layout is related uint64_t in arm64 little endian
+ * if uint64 is 0x010203040A0B0C0D, the next is 0A0B0C0D and
+ * the owner is 01020304.
+ */
+
+struct ticket_spinlock_s
+{
+    atomic_uint next;

Review Comment:
   Yes, atomic operation can be done on the size smaller than native size(4B 
for 32bit, 8B for 64bit).



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