You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by pk...@apache.org on 2022/07/26 09:03:22 UTC

[incubator-nuttx] branch master updated: sched: Remove the not really used cmptime

This is an automated email from the ASF dual-hosted git repository.

pkarashchenko pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git


The following commit(s) were added to refs/heads/master by this push:
     new 579934e709 sched: Remove the not really used cmptime
579934e709 is described below

commit 579934e7094f06861a040310d74383c54526a06d
Author: Xiang Xiao <xi...@xiaomi.com>
AuthorDate: Tue Jul 26 00:10:27 2022 +0800

    sched: Remove the not really used cmptime
    
    Signed-off-by: Xiang Xiao <xi...@xiaomi.com>
---
 sched/sched/sched_timerexpiration.c | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/sched/sched/sched_timerexpiration.c b/sched/sched/sched_timerexpiration.c
index 4ce08f1bac..d2fe61597d 100644
--- a/sched/sched/sched_timerexpiration.c
+++ b/sched/sched/sched_timerexpiration.c
@@ -373,9 +373,6 @@ static inline unsigned int nxsched_process_wdtimer(uint32_t ticks,
 static unsigned int nxsched_timer_process(unsigned int ticks,
                                           bool noswitches)
 {
-#if CONFIG_RR_INTERVAL > 0 || defined(CONFIG_SCHED_SPORADIC)
-  unsigned int cmptime = UINT_MAX;
-#endif
   unsigned int rettime = 0;
   unsigned int tmp;
 
@@ -403,9 +400,6 @@ static unsigned int nxsched_timer_process(unsigned int ticks,
   tmp = nxsched_process_wdtimer(ticks, noswitches);
   if (tmp > 0)
     {
-#if CONFIG_RR_INTERVAL > 0 || defined(CONFIG_SCHED_SPORADIC)
-      cmptime = tmp;
-#endif
       rettime = tmp;
     }
 
@@ -416,7 +410,7 @@ static unsigned int nxsched_timer_process(unsigned int ticks,
   tmp = nxsched_process_scheduler(ticks, noswitches);
 
 #if CONFIG_RR_INTERVAL > 0 || defined(CONFIG_SCHED_SPORADIC)
-  if (tmp > 0 && tmp < cmptime)
+  if (tmp > 0 && tmp < rettime)
     {
       rettime = tmp;
     }