Skip to content

Commit

Permalink
kernel: fix dummy init thread prio in preempt-only configurations
Browse files Browse the repository at this point in the history
A thread cannot have a coop priority in this case. It turns out a
priority is not needed when a thread is not inserted in the ready queue,
which is the case with the dummy thread.

The comment was also out-of-date, since it referred to a nanokernel
concept.

Change-Id: Id117501164bd72383d53f3df13030cf95dadc38b
Signed-off-by: Benjamin Walsh <[email protected]>
  • Loading branch information
benwrs authored and bboccoqq committed Dec 15, 2016
1 parent 8e4a534 commit a209839
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions kernel/unified/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -238,12 +238,7 @@ static void prepare_multithreading(struct k_thread *dummy_thread)

_current = dummy_thread;

/*
* Do not insert dummy execution context in the list of fibers, so
* that it does not get scheduled back in once context-switched out.
*/
dummy_thread->base.flags = K_ESSENTIAL;
dummy_thread->base.prio = K_PRIO_COOP(0);
#endif

/* _kernel.ready_q is all zeroes */
Expand Down

0 comments on commit a209839

Please sign in to comment.