kernel: thread: fix thread priority off-by-one error
Setting CONFIG_NUM_PREEMPT_PRIORITIES to 128 causes the idle thread to be
assigned priority 128, which exceeds the int8_t range. This results in the
idle thread being assigned the highest priority (-128) instead of the
lowest, causing threads to not wake up from k_sleep.
Restrict the range of CONFIG_NUM_PREEMPT_PRIORITIES to 0 to 127 to ensure
the idle thread always has the lowest priority.
Signed-off-by:
Jonas Spinner <jonas.spinner@burkert.com>
Loading
Please sign in to comment