Skip to content

Commit

Permalink
kernel: Do not mark thread as queued in k_yield()
Browse files Browse the repository at this point in the history
SMP does not need to mark the current thread as queued in
k_yield() as that will naturally get done in do_swap().

Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
  • Loading branch information
peter-mitsis authored and kartben committed Jan 28, 2025
1 parent 93aae03 commit bfe0b74
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions kernel/sched.c
Original file line number Diff line number Diff line change
@@ -1048,9 +1048,6 @@ void z_impl_k_yield(void)

k_spinlock_key_t key = k_spin_lock(&_sched_spinlock);

#ifdef CONFIG_SMP
z_mark_thread_as_queued(_current);
#endif
runq_yield();

update_cache(1);

0 comments on commit bfe0b74

Please sign in to comment.