zephyr/kernel
Nicolas Pitre 524ac8a29a sched: don't call k_sched_time_slice_set() during early init
All we really want here is to set default parameters. However
k_sched_time_slice_set() also calls z_reset_time_slice(_current)
which expects `_current` to be fully initialized.

Simply initialize `slice_ticks` and `slice_max_prio` with default values
directly. Unfortunately the compiler isn't smart enough to expand
k_ms_to_ticks_ceil32(CONFIG_TIMESLICE_SIZE) to a constant expression
at build time so we must do the conversion by hand (and it shouldn't
overflow due to the nature of the value).

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2023-04-03 19:16:48 -04:00
..
include
paging
atomic_c.c
banner.c
CMakeLists.txt
compiler_stack_protect.c
condvar.c
device.c
errno.c
events.c
fatal.c
futex.c
idle.c
init.c
Kconfig
Kconfig.vm
kheap.c
mailbox.c
main_weak.c
mem_domain.c
mem_slab.c
mempool.c
mmu.c
msg_q.c
mutex.c
pipes.c
poll.c
queue.c
sched.c sched: don't call k_sched_time_slice_set() during early init 2023-04-03 19:16:48 -04:00
sem.c
smp.c
stack.c
system_work_q.c
thread.c
timeout.c
timer.c
usage.c
userspace_handler.c
userspace.c
version.c
work.c
xip.c