sched optimise for sim, CONFIG_SCHED_INSTRUMENTATION to CONFIG_SCHED_INSTRUMENTATION_SWITCH #13688
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
sched_smp:sync refcount before enqueue smp call queue
sched_smp:adjust the critical section to protect refcount from multi cores access
fix build error when sim 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);
| ^~~
Impact
SMP call more safe,
SIM able to enable SMP
Testing
CI test