patacongo commented on a change in pull request #2298:
URL: https://github.com/apache/incubator-nuttx/pull/2298#discussion_r523594022



##########
File path: sched/sched/sched_waitid.c
##########
@@ -143,6 +143,14 @@ int nx_waitid(int idtype, id_t id, FAR siginfo_t *info, 
int options)
   sigemptyset(&set);
   nxsig_addset(&set, SIGCHLD);
 
+  /* NOTE: sched_lock() is not enough for SMP
+   * because the child task is running on another CPU
+   */
+
+#ifdef CONFIG_SMP
+  irqstate_t flags = enter_critical_section();

Review comment:
       > I think replacing sched_lock() and sched_unlock() with a critical 
section should be a future task.
   
   Discussed a little in issue #1138, Related to issue #1137




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