hujun260 commented on code in PR #16673: URL: https://github.com/apache/nuttx/pull/16673#discussion_r2228471323
########## sched/sched/sched_process_delivered.c: ########## @@ -78,67 +72,31 @@ void nxsched_process_delivered(int cpu) g_cpu_irqset |= (1 << cpu); } - tcb = current_task(cpu); - - if (g_delivertasks[cpu] == NULL) - { - if (tcb->irqcount <= 0) - { - cpu_irqlock_clear(); - } - - return; - } - - if (nxsched_islocked_tcb(tcb)) + if (!nxsched_switch_running(cpu)) Review Comment: Is it necessary to add a check here to ensure that tasks of the same priority are not replaced? Although a check was performed before the interrupt was issued, once the critical section is exited, the state can change. -- 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