pussuw commented on a change in pull request #5758:
URL: https://github.com/apache/incubator-nuttx/pull/5758#discussion_r829000254
##########
File path: arch/risc-v/include/arch.h
##########
@@ -60,6 +60,12 @@ static inline uintptr_t up_getsp(void)
return sp;
}
+/* The kernel needs this in case CONFIG_SMP is defined */
+
+#ifdef CONFIG_SMP
+#define up_cpu_index (int)riscv_cpuindex
Review comment:
I'm not very happy about this either, but the ordering is correct at
least now, nuttx/arch includes arch/arch so the substitution will work. Of
course it is quite volatile and will break easily.
Another option is to implement up_cpu_index() as a function which then tails
riscv_cpu_index()
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]