From f90ce01d4ac507c99e3cddcaba6fd13239b06034 Mon Sep 17 00:00:00 2001 From: Anas Nashif Date: Mon, 25 Nov 2024 19:01:38 -0500 Subject: [PATCH] kernel: sched: use arch_current_thread instead of _current _current is deprecated, use arch_current_thread() Signed-off-by: Anas Nashif --- kernel/sched.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/sched.c b/kernel/sched.c index 502899bd9d6..61e5b5dedbd 100644 --- a/kernel/sched.c +++ b/kernel/sched.c @@ -502,7 +502,7 @@ void z_impl_k_thread_suspend(k_tid_t thread) /* Special case "suspend the current thread" as it doesn't * need the async complexity below. */ - if (thread == _current && !arch_is_in_isr() && !IS_ENABLED(CONFIG_SMP)) { + if (thread == arch_current_thread() && !arch_is_in_isr() && !IS_ENABLED(CONFIG_SMP)) { k_spinlock_key_t key = k_spin_lock(&_sched_spinlock); z_mark_thread_as_suspended(thread);