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: Peter Mitsis <peter.mitsis@intel.com>
1 file changed