Skip to content
Commit 84473630 authored by Andy Ross's avatar Andy Ross Committed by Andrew Boie
Browse files

kernel/thread_abort: Swap, don't reschedule when aborting _current



The z_reschedule() call (as of the accompanying fix) will not swap
away from a thread if called with a nested irq lock held.

But for the specific case of aborting the current thread, we
absolutely need to swap regardless of how many locks the thread that
just aborted might have held.  So call z_swap() explicitly here.

This preserves the existing z_reschedule() call in other circumstances
for compatibility with existing test cases, but adds a note explaining
why it's there when the only obvious reason for it is already covered.

Signed-off-by: default avatarAndy Ross <andrew.j.ross@intel.com>
parent e6af0f8c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment