mu578 commented on code in PR #10681:
URL: https://github.com/apache/nuttx/pull/10681#discussion_r1330512276


##########
libs/libc/pthread/pthread_once.c:
##########
@@ -73,15 +75,15 @@ int pthread_once(FAR pthread_once_t *once_control,
 
   /* Prohibit pre-emption while we test and set the once_control. */
 
-  sched_lock();
+  flags = enter_critical_section();

Review Comment:
   yes it needs a full mutex implementation, so context aware i.e so that mutex 
holds internally a critical section and so on 
   
   ```
   C process lock.lock
                |
   A         ---+
           C process preempted by B
                |
   C            +----+
   B                 +-------->
                      B keeps A from running.
   ```



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