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


##########
include/nuttx/spinlock.h:
##########
@@ -39,6 +39,26 @@
 typedef uint8_t spinlock_t;
 #else
 
+#ifdef CONFIG_TICKET_SPINLOCK
+
+#  define SP_UNLOCKED 0  /* The Un-locked state */
+#  define SP_LOCKED   1  /* The Locked state */
+
+#  define INIT_SPINLOCK_VALUE {{SP_UNLOCKED}}
+
+union spinlock_u
+{
+  struct
+  {
+    uint16_t owner;
+    uint16_t next;
+  } tickets;

Review Comment:
   follow the patch.
   
https://lore.kernel.org/linux-riscv/caahsdy1jhlufwu7rucaq+ruwrbks2ksdva7eprt8--4zfof...@mail.gmail.com/T/
   
   Sorry the link can't b hyperlink.
   
   Using tickets means owner and next.
   



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