Commit f90ce01d authored by Anas Nashif's avatar Anas Nashif
Browse files

kernel: sched: use arch_current_thread instead of _current

_current is deprecated, use arch_current_thread()
Signed-off-by: default avatarAnas Nashif <anas.nashif@intel.com>
parent 95aaa97d
Loading
Loading
Loading
Loading
+1 −1
Changes for kernel/sched.c: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -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);