From bfe0b74aad2f202e6cd0d7e8abc487caf2d99576 Mon Sep 17 00:00:00 2001 From: Peter Mitsis Date: Thu, 23 Jan 2025 15:33:16 -0800 Subject: [PATCH] kernel: Do not mark thread as queued in k_yield() 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 --- kernel/sched.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/kernel/sched.c b/kernel/sched.c index bfd13b9a475d..37a3efb96ec9 100644 --- a/kernel/sched.c +++ b/kernel/sched.c @@ -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);