You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2022/07/21 12:29:56 UTC

[GitHub] [incubator-nuttx] pkarashchenko commented on a diff in pull request #6660: sched/sched/sched_timerexpiration: add RR option

pkarashchenko commented on code in PR #6660:
URL: https://github.com/apache/incubator-nuttx/pull/6660#discussion_r926615793


##########
sched/sched/sched_timerexpiration.c:
##########
@@ -238,7 +238,26 @@ static uint32_t nxsched_cpu_scheduler(int cpu, uint32_t ticks,
     {
       /* Apply the keep alive hack */
 
+#ifdef CONFIG_SCHED_RR_IDLETASK
       return KEEP_ALIVE_TICKS;
+#else
+
+      /* The idle task is the only task in that sched_priority == 0.
+       */
+
+      if (ntcb->sched_priority != 0)

Review Comment:
   ```suggestion
         if (ntcb->flink != NULL)
   ```
   I think we should use similar approach to one that is used in `bool sched_idletask(void)`



-- 
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-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org