kernel/sched: Re-add IPI calls on k_wakeup() and k_thread_priority_set()

These got dropped by an earlier patch, but are required on SMP systems
so synchronously notify other CPUs of changed scheduler state.

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
This commit is contained in:
Andy Ross 2020-02-04 13:52:09 -08:00 committed by Anas Nashif
commit 5737b5c843

View file

@ -674,6 +674,10 @@ void z_thread_priority_set(struct k_thread *thread, int prio)
{
bool need_sched = z_set_prio(thread, prio);
#if defined(CONFIG_SMP) && defined(CONFIG_SCHED_IPI_SUPPORTED)
arch_sched_ipi();
#endif
if (need_sched && _current->base.sched_locked == 0) {
z_reschedule_unlocked();
}
@ -1186,6 +1190,10 @@ void z_impl_k_wakeup(k_tid_t thread)
z_mark_thread_as_not_suspended(thread);
z_ready_thread(thread);
#if defined(CONFIG_SMP) && defined(CONFIG_SCHED_IPI_SUPPORTED)
arch_sched_ipi();
#endif
if (!arch_is_in_isr()) {
z_reschedule_unlocked();
}