pussuw commented on code in PR #14465:
URL: https://github.com/apache/nuttx/pull/14465#discussion_r1812161905


##########
sched/semaphore/semaphore.h:
##########
@@ -31,10 +31,17 @@
 #include <nuttx/compiler.h>
 #include <nuttx/semaphore.h>
 #include <nuttx/sched.h>
+#include <nuttx/atomic.h>
 
 #include <stdint.h>
 #include <stdbool.h>
 
+/****************************************************************************
+ * Pre-processor Definitions
+ ****************************************************************************/
+
+#define NXSEM_COUNT(s) ((FAR atomic_short *)&(s)->semcount)

Review Comment:
   Should semcount be atomic_short to begin with ? What happens if the compiler 
/ architecture cannot handle datatypes that are not of natural width atomically 
without locking ?



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