examples: hello: Show CPU index when running in SMP mode
#include <nuttx/config.h>
#include <stdio.h>
+#ifdef CONFIG_SMP
+# include <nuttx/arch.h>
+#endif
+
/****************************************************************************
* Public Functions
****************************************************************************/
int main(int argc, FAR char *argv[])
{
+#ifdef CONFIG_SMP
+ uint32_t cpu = up_cpu_index();
+
+ printf("Hello, World from CPU%d !!\n", cpu);
+#else
printf("Hello, World!!\n");
+#endif
return 0;
}
