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



##########
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:
       Isn't the call to `sched_(un)lock` in line 156 not needed then?




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