xiaoxiang781216 commented on code in PR #10752:
URL: https://github.com/apache/nuttx/pull/10752#discussion_r1335036980
##########
include/pthread.h:
##########
@@ -136,7 +136,7 @@
/* Used to initialize a pthread_once_t */
-#define PTHREAD_ONCE_INIT (false)
+#define PTHREAD_ONCE_INIT {false, PTHREAD_MUTEX_INITIALIZER}
Review Comment:
It's normally a program error to call an initialization routine recursively,
it's good to catch this error through the non-recursive mutex(dead lock).
--
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]