Skip to content

Commit f90ce01

Browse files
committed
kernel: sched: use arch_current_thread instead of _current
_current is deprecated, use arch_current_thread() Signed-off-by: Anas Nashif <[email protected]>
1 parent 95aaa97 commit f90ce01

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

kernel/sched.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -502,7 +502,7 @@ void z_impl_k_thread_suspend(k_tid_t thread)
502502
/* Special case "suspend the current thread" as it doesn't
503503
* need the async complexity below.
504504
*/
505-
if (thread == _current && !arch_is_in_isr() && !IS_ENABLED(CONFIG_SMP)) {
505+
if (thread == arch_current_thread() && !arch_is_in_isr() && !IS_ENABLED(CONFIG_SMP)) {
506506
k_spinlock_key_t key = k_spin_lock(&_sched_spinlock);
507507

508508
z_mark_thread_as_suspended(thread);

0 commit comments

Comments
 (0)