Skip to content
Commit e81ccef6 authored by Kai Vehmanen's avatar Kai Vehmanen Committed by Anas Nashif
Browse files

kernel/sched: fix condition for CPU mask set



When building with CONFIG_SCHED_CPU_MASK_PIN_ONLY=y, CPU mask
is fixed and cannot be changed while thread is running.

The current code asserts if thread state is anything but PREPARED.

We do however have interface like k_work_queue_start() where a thread is
started as part of the queue start. To allow user to set the pinned CPU
for the work queue thread, it needs to be possible to suspend the
thread, set the mask, and then call k_thread_resume(). This seems to be
a valid sequence, so relax the assert check to reflect this.

Signed-off-by: default avatarKai Vehmanen <kai.vehmanen@linux.intel.com>
parent 45465708
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment