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/01/30 09:20:39 UTC

[GitHub] [incubator-nuttx-apps] xiaoxiang781216 commented on a change in pull request #37: examples: hello: Show CPU index when running in SMP mode

xiaoxiang781216 commented on a change in pull request #37: examples: hello: Show CPU index when running in SMP mode
URL: https://github.com/apache/incubator-nuttx-apps/pull/37#discussion_r372767700
 
 

 ##########
 File path: examples/hello/hello_main.c
 ##########
 @@ -50,6 +54,12 @@
 
 int main(int argc, FAR char *argv[])
 {
+#ifdef CONFIG_SMP
+  uint32_t cpu = up_cpu_index();
 
 Review comment:
   application shouldn't call up_xxx API directly, it's better to implement something like:
   int sched_getcpu(void);
   and add this api to syscall/ list

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


With regards,
Apache Git Services