You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by ma...@apache.org on 2021/07/16 08:41:08 UTC

[incubator-nuttx] branch master updated: arch/sim: Remove the unused sim_host_timer_handler

This is an automated email from the ASF dual-hosted git repository.

masayuki pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git


The following commit(s) were added to refs/heads/master by this push:
     new 3204c75  arch/sim: Remove the unused sim_host_timer_handler
3204c75 is described below

commit 3204c75c1d7b516a7095e05288d5c373769d96b9
Author: Xiang Xiao <xi...@xiaomi.com>
AuthorDate: Fri Jul 16 01:54:54 2021 +0800

    arch/sim: Remove the unused sim_host_timer_handler
    
    Signed-off-by: Xiang Xiao <xi...@xiaomi.com>
    Change-Id: Icacbe74308580b7fc2449cdf9e41f85fce43d5a4
---
 arch/sim/src/sim/up_simsmp.c | 41 -----------------------------------------
 1 file changed, 41 deletions(-)

diff --git a/arch/sim/src/sim/up_simsmp.c b/arch/sim/src/sim/up_simsmp.c
index e91917f..f35d1e2 100644
--- a/arch/sim/src/sim/up_simsmp.c
+++ b/arch/sim/src/sim/up_simsmp.c
@@ -51,22 +51,12 @@ struct sim_cpuinfo_s
 static pthread_key_t g_cpu_key;
 static pthread_t     g_cpu_thread[CONFIG_SMP_NCPUS];
 
-static pthread_t     g_timer_thread;
-
 /****************************************************************************
  * NuttX domain function prototypes
  ****************************************************************************/
 
-#ifdef CONFIG_SCHED_INSTRUMENTATION
-void sched_note_cpu_start(struct tcb_s *tcb, int cpu);
-void sched_note_cpu_pause(struct tcb_s *tcb, int cpu);
-void sched_note_cpu_resume(struct tcb_s *tcb, int cpu);
-#endif
-
 void up_irqinitialize(void);
 
-extern uint8_t g_nx_initstate;
-
 /****************************************************************************
  * Private Functions
  ****************************************************************************/
@@ -139,30 +129,6 @@ static void *sim_idle_trampoline(void *arg)
 }
 
 /****************************************************************************
- * Name: sim_host_timer_handler
- ****************************************************************************/
-
-static void *sim_host_timer_handler(void *arg)
-{
-  /* Wait until OSINIT_OSREADY(5) */
-
-  while (g_nx_initstate < 5)
-    {
-      host_sleep(10 * 1000 * 1000); /* 10ms */
-    }
-
-  /* Send a periodic timer event to CPU0 */
-
-  while (1)
-    {
-      pthread_kill(g_cpu_thread[0], SIGUSR1);
-      host_sleep(10 * 1000 * 1000); /* 10ms */
-    }
-
-  return NULL;
-}
-
-/****************************************************************************
  * Public Functions
  ****************************************************************************/
 
@@ -202,13 +168,6 @@ void sim_cpu0_start(void)
     {
       return;
     }
-
-  /* NOTE: IRQ initialization will be done in up_irqinitialize */
-
-  /* Create timer thread to send a periodic timer event */
-
-  ret = pthread_create(&g_timer_thread,
-                       NULL, sim_host_timer_handler, NULL);
 }
 
 /****************************************************************************