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:
parent
f1f38b6e16
commit
1237e9fcea
@ -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 */
|
||||
|
@ -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 */
|
||||
|
Loading…
Reference in New Issue
Block a user