Skip to content
Commit e55ac3ef authored by Peter Mitsis's avatar Peter Mitsis Committed by Benjamin Cabé
Browse files

kernel: Improve ordering in SMP k_thread_suspend()



The routine k_thread_suspend() has a fast path for non-SMP when
suspending the current thread. When SMP is enabled, it is expected
that the compiler drop the entire fast path checks because the whole
expression would always evaluate to false. However, the compiler has
been observed to only drop whole fast path check when the
"!IS_ENABLED(CONFIG_SMP)" condition appears at the beginning of the
fast path check.

Signed-off-by: default avatarPeter Mitsis <peter.mitsis@intel.com>
parent 01e41295
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment