Skip to content
Permalink
Browse files

kernel: timeout: do not active time slicing if idle thread ready

zero slice_ticks when can't time slice so that next_timeout will
ignore slice_ticks of _current_cpu and system can stay low power
state longer time.

Fixes: #17368.

Signed-off-by: Wentong Wu <wentong.wu@intel.com>
  • Loading branch information...
wentongwu authored and andrewboie committed Jul 24, 2019
1 parent bdb0284 commit 2463ded4c84cc8e0f1de3d3966c67db0c025e113
Showing with 2 additions and 0 deletions.
  1. +2 −0 kernel/sched.c
@@ -297,6 +297,8 @@ void z_time_slice(int ticks)
} else {
_current_cpu->slice_ticks -= ticks;
}
} else {
_current_cpu->slice_ticks = 0;
}
}
#else

0 comments on commit 2463ded

Please sign in to comment.
You can’t perform that action at this time.