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/07/30 07:26:26 UTC

[GitHub] [incubator-nuttx] xiaoxiang781216 commented on a change in pull request #1461: arch/sim: Make up_internal.h includable in host environment

xiaoxiang781216 commented on a change in pull request #1461:
URL: https://github.com/apache/incubator-nuttx/pull/1461#discussion_r462740772



##########
File path: arch/sim/src/sim/up_simsmp.c
##########
@@ -90,20 +77,14 @@ static pthread_t              g_sim_cputhread[CONFIG_SMP_NCPUS];
  * so that it will be ready for the next pause operation.
  */
 
-volatile spinlock_t g_cpu_wait[CONFIG_SMP_NCPUS];
-volatile spinlock_t g_cpu_paused[CONFIG_SMP_NCPUS];
+volatile bool g_cpu_wait[CONFIG_SMP_NCPUS];
+volatile bool g_cpu_paused[CONFIG_SMP_NCPUS];

Review comment:
       Yes, you are right. It's better change the typedef spinlock_t to uint8_t instead of bool to improve the compatibility.

##########
File path: arch/sim/src/sim/up_head.c
##########
@@ -89,11 +89,10 @@ int main(int argc, char **argv, char **envp)
       /* Start the CPU0 emulation.  This should not return. */
 
       sim_cpu0_start();
-#else
+#endif
       /* Start the Nuttx emulation.  This should not return. */
 
       nx_start();
-#endif
     }

Review comment:
       Hmm, git rebase don't catch the confliction. I will remove it.




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