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 2022/05/06 10:37:48 UTC

[GitHub] [incubator-nuttx] xiaoxiang781216 commented on a diff in pull request #6215: sched/group: addrenv: allocate g_pid_current for each cpu

xiaoxiang781216 commented on code in PR #6215:
URL: https://github.com/apache/incubator-nuttx/pull/6215#discussion_r866701081


##########
sched/group/group_addrenv.c:
##########
@@ -46,7 +46,19 @@
  * This must only be accessed with interrupts disabled.
  */
 
-pid_t g_pid_current = INVALID_PROCESS_ID;
+pid_t g_pid_current[CONFIG_SMP_NCPUS] =
+{
+  INVALID_PROCESS_ID,
+#if CONFIG_SMP_NCPUS > 1
+  INVALID_PROCESS_ID,
+#if CONFIG_SMP_NCPUS > 2
+  INVALID_PROCESS_ID,
+#if CONFIG_SMP_NCPUS > 3

Review Comment:
   can we make it more extensible?



-- 
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-unsubscribe@nuttx.apache.org

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