Fix-Point commented on code in PR #21342:
URL: https://github.com/apache/nuttx/pull/21342#discussion_r4454193936


##########
arch/arm/include/armv7-a/barriers.h:
##########
@@ -47,6 +47,21 @@
 
 #define UP_ISB()  arm_isb()
 #define UP_NOP()  arm_nop()
-#define UP_SEV()  arm_sev()
+
+/* SEV is not a memory access and is not subject to memory ordering,
+ * so a waiter may observe the event before the lock release store
+ * becomes visible.  The waiter then re-reads the stale lock and sleeps
+ * again with the event already consumed (missed wakeup).  DSB makes
+ * the store visible before SEV.  From ARM Reference Manual DDI 0406C,
+ * "Use of WFE and SEV with Locks".
+ */
+
+#define UP_SEV()  \

Review Comment:
   Done.



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