kernel: use z_swap_unlocked in k_thread_abort
z_swap_unlocked() does the same construction of using a dummy spinlock; just use that and make the code simpler. Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
This commit is contained in:
parent
60be4eb653
commit
5a2619e17a
1 changed files with 1 additions and 3 deletions
|
@ -38,9 +38,7 @@ void z_impl_k_thread_abort(k_tid_t thread)
|
|||
* for "is _current dead" and we don't want one for
|
||||
* performance reasons.
|
||||
*/
|
||||
struct k_spinlock lock = {};
|
||||
|
||||
z_swap(&lock, k_spin_lock(&lock));
|
||||
z_swap_unlocked();
|
||||
} else {
|
||||
z_reschedule_unlocked();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue