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:
parent
c44d566aee
commit
5737b5c843
1 changed files with 8 additions and 0 deletions
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue