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


##########
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:
   @xiaoxiang781216 Sorry but I have a question is is it possible use 32bit 
spinlock on 64bit machine?
   I found the 
[page.](http://lists.infradead.org/pipermail/linux-arm-kernel/2013-October/203491.html)
   In the bottom of page, it shows ticket spinlock is 32bit even on 64 bit 
machine.
   
   I've attempted to modify spinlock_t to 32bit but it failed.



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