xiaoxiang781216 commented on a change in pull request #2946:
URL: https://github.com/apache/incubator-nuttx/pull/2946#discussion_r585283915



##########
File path: sched/task/task_exithook.c
##########
@@ -645,7 +645,20 @@ void nxtask_exithook(FAR struct tcb_s *tcb, int status, 
bool nonblocking)
 
   if (!nonblocking)
     {
+      /* NOTE: nxtask_flushstreams() calls lib_flushall()
+       * which handles a semaphore in userspace.
+       * It should be done without a critical section.
+       */
+
+#ifdef CONFIG_SMP
+      leave_critical_section(flags);
+#endif
+
       nxtask_flushstreams(tcb);

Review comment:
       Yes, but we can merge two "if (!nonblocking)..." into one




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

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to