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>
This commit is contained in:
parent
bdb0284b82
commit
2463ded4c8
1 changed files with 2 additions and 0 deletions
|
@ -297,6 +297,8 @@ void z_time_slice(int ticks)
|
||||||
} else {
|
} else {
|
||||||
_current_cpu->slice_ticks -= ticks;
|
_current_cpu->slice_ticks -= ticks;
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
_current_cpu->slice_ticks = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue