jlaitine commented on code in PR #16673: URL: https://github.com/apache/nuttx/pull/16673#discussion_r2228956996
########## sched/sched/sched.h: ########## @@ -518,23 +514,51 @@ static inline_function bool nxsched_add_prioritized(FAR struct tcb_s *tcb, } # ifdef CONFIG_SMP + +/* Try to switch the head of the ready-to-run list to active on "cpu". + * "curr_cpu" is "this_cpu()", and passed only for optimization. + */ + +static inline_function bool nxsched_deliver_task(int cpu, int curr_cpu) +{ + bool ret = false; + + /* If there is already a schedule interrupt pending, there is + * no need to do anything now. + */ + + if (!g_delivertasks[cpu]) Review Comment: I think this is necessary optimization. At least on my risc-v platform it even shows in the cpu load -- 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. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org