hujun260 commented on code in PR #16673:
URL: https://github.com/apache/nuttx/pull/16673#discussion_r2228505079


##########
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:
   Is this judgment necessary? I think this is a very rare case. Even if it 
happens, there's no need to judge here; just respond to the interrupt normally.



-- 
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

Reply via email to