From d88ce65463c43bc87f8471c14068efebc9cb1e65 Mon Sep 17 00:00:00 2001 From: Lauren Murphy Date: Tue, 9 Mar 2021 16:41:43 -0600 Subject: [PATCH] kernel/sched: only send IPI to abort thread if hardware supports it Wrap arch_sched_ipi() call in z_thread_abort() with ifdef checking for hardware support of IPI. Fixes #32723 Signed-off-by: Lauren Murphy --- kernel/sched.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/kernel/sched.c b/kernel/sched.c index 216137162ce..e2772b6c9c3 100644 --- a/kernel/sched.c +++ b/kernel/sched.c @@ -1497,7 +1497,10 @@ void z_thread_abort(struct k_thread *thread) if (active) { /* It's running somewhere else, flag and poke */ thread->base.thread_state |= _THREAD_ABORTING; + +#ifdef CONFIG_SCHED_IPI_SUPPORTED arch_sched_ipi(); +#endif } if (is_aborting(thread) && thread != _current) {