smp:fix sim build error under config CONFIG_SMP

CC:  sim/sim_smpsignal.c init/nx_smpstart.c: In function ‘nx_idle_trampoline’:
init/nx_smpstart.c:68:21: warning: unused variable ‘tcb’ [-Wunused-variable]
   68 |   FAR struct tcb_s *tcb = this_task_inirq();
      |                     ^~~
sim/sim_smpsignal.c: In function ‘host_cpu_started’:
sim/sim_smpsignal.c:271:17: warning: unused variable ‘tcb’ [-Wunused-variable]
  271 |   struct tcb_s *tcb = this_task();

sim/sim_smpsignal.c:249:33: error: ‘cpu’ undeclared (first use in this function)
  249 |   restore_critical_section(tcb, cpu);
      |                                 ^~~

Signed-off-by: buxiasen <buxiasen@xiaomi.com>
This commit is contained in:
dulibo1 2024-04-22 12:22:22 +08:00 committed by Xiang Xiao
parent f1f38b6e16
commit 1237e9fcea
2 changed files with 2 additions and 6 deletions

View File

@ -251,10 +251,6 @@ int up_cpu_paused_restore(void)
nxsched_resume_scheduler(tcb);
/* Restore the cpu lock */
restore_critical_section(tcb, this_cpu());
/* Then switch contexts. Any necessary address environment changes
* will be made when the interrupt returns.
*/
@ -274,7 +270,7 @@ int up_cpu_paused_restore(void)
void host_cpu_started(void)
{
#ifdef CONFIG_SCHED_INSTRUMENTATION
#ifdef CONFIG_SCHED_INSTRUMENTATION_SWITCH
struct tcb_s *tcb = this_task();
/* Notify that this CPU has started */

View File

@ -66,7 +66,7 @@
void nx_idle_trampoline(void)
{
#ifdef CONFIG_SCHED_INSTRUMENTATION
#ifdef CONFIG_SCHED_INSTRUMENTATION_SWITCH
FAR struct tcb_s *tcb = this_task();
/* Announce that the IDLE task has started */