kernel/sched: Don't make an IPI if we don't need it

If an architecture declares support for IPI, we still want to use it
only when running in SMP mode.

(This also fixes a build failure on ARC, which declares
CONFIG_SCHED_IPI_SUPPORTED but doesn't actually implement
z_arch_sched_ipi() yet).

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
This commit is contained in:
Andy Ross 2019-08-27 08:53:27 -07:00 committed by Anas Nashif
commit d82f76a0bb

View file

@ -336,7 +336,7 @@ void z_add_thread_to_ready_q(struct k_thread *thread)
_priq_run_add(&_kernel.ready_q.runq, thread);
z_mark_thread_as_queued(thread);
update_cache(0);
#ifdef CONFIG_SCHED_IPI_SUPPORTED
#if defined(CONFIG_SMP) && defined(CONFIG_SCHED_IPI_SUPPORTED)
z_arch_sched_ipi();
#endif
}