hujun260 commented on code in PR #16673: URL: https://github.com/apache/nuttx/pull/16673#discussion_r2193984003
########## sched/sched/sched_suspend.c: ########## @@ -172,7 +173,11 @@ void nxsched_suspend(FAR struct tcb_s *tcb) { switch_needed = nxsched_remove_readytorun(tcb); - if (list_pendingtasks()->head) +#ifdef CONFIG_SMP + if (!dq_empty(list_readytorun())) +#else + if (!dq_empty(list_pendingtasks())) +#endif Review Comment: I think should like this #ifdef CONFIG_SMP if (!dq_empty(list_readytorun()) && !nxsched_islocked_tcb(rtcb)) #else if (!dq_empty(list_pendingtasks()) && !nxsched_islocked_tcb(rtcb)) #endif -- 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