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/25 05:38:30 UTC

[GitHub] [incubator-nuttx] xiaoxiang781216 commented on a diff in pull request #6660: sched/sched/sched_timerexpiration: idle task no need RR time slice

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


##########
sched/sched/sched_timerexpiration.c:
##########
@@ -233,14 +231,23 @@ static uint32_t nxsched_cpu_scheduler(int cpu, uint32_t ticks,
 
   /* Returning zero means that there is no interesting event to be timed */
 
-#ifdef KEEP_ALIVE_HACK
   if (ret == 0)
     {
       /* Apply the keep alive hack */
 
-      return KEEP_ALIVE_TICKS;
+      /* The idle task always lies at the end of the task list,
+       * idle task no need time slice.
+       */
+
+      if (ntcb->flink != NULL)

Review Comment:
   Yes, you are right.



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