anchao commented on code in PR #15126:
URL: https://github.com/apache/nuttx/pull/15126#discussion_r1883140265


##########
sched/pthread/pthread_mutex.c:
##########
@@ -38,6 +38,12 @@
 #include "sched/sched.h"
 #include "pthread/pthread.h"
 
+/****************************************************************************
+ * Public Data
+ ****************************************************************************/
+
+static spinlock_t g_mutex_spinlock = SP_UNLOCKED;

Review Comment:
   need global lock here, for the instance of mutex might be accessed by 
multiple threads
   
   
![image](https://github.com/user-attachments/assets/2d16806c-53a3-4a36-8e05-93dab2c05d46)
   



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