Revert "examples: hello: Show CPU index when running in SMP mode"
Cannot call up_cpu_index() or any other nonstandard OS application interface. This not only breaks the portable POSIX OS interface but also would break any PROTECTED or KERNEL mode SMP implementation.
If you want to do something like this in user space, the appropriate thing to do would be to extend prctl(). That is non-posix, but is at least Linux-like and will work in all build modes.
This reverts commit 715517b1a0
.
This commit is contained in:
parent
715517b1a0
commit
4e509c8659
@ -40,10 +40,6 @@
|
||||
#include <nuttx/config.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#ifdef CONFIG_SMP
|
||||
# include <nuttx/arch.h>
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Public Functions
|
||||
****************************************************************************/
|
||||
@ -54,12 +50,6 @@
|
||||
|
||||
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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user