You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2020/11/15 01:44:41 UTC

[GitHub] [incubator-nuttx] patacongo commented on a change in pull request #2298: sched: Fix nx_waitid(), nx_waitpid(), nxtask_exithook() for SMP

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:
users@infra.apache.org