We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 95aaa97 commit f90ce01Copy full SHA for f90ce01
kernel/sched.c
@@ -502,7 +502,7 @@ void z_impl_k_thread_suspend(k_tid_t thread)
502
/* Special case "suspend the current thread" as it doesn't
503
* need the async complexity below.
504
*/
505
- if (thread == _current && !arch_is_in_isr() && !IS_ENABLED(CONFIG_SMP)) {
+ if (thread == arch_current_thread() && !arch_is_in_isr() && !IS_ENABLED(CONFIG_SMP)) {
506
k_spinlock_key_t key = k_spin_lock(&_sched_spinlock);
507
508
z_mark_thread_as_suspended(thread);
0 commit comments