Skip to content

Commit

Permalink
kernel: Remove clearing of swap_ok in do_swap()
Browse files Browse the repository at this point in the history
Removes an unnecessary clearing of the current CPU's swap_ok field
in do_swap() as that clearing is already done at the end of next_up()
which was just called by z_swap_next_thread() a little earlier.

Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
  • Loading branch information
peter-mitsis authored and kartben committed Jan 28, 2025
1 parent bfe0b74 commit 568b638
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion kernel/include/kswap.h
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,6 @@ static ALWAYS_INLINE unsigned int do_swap(unsigned int key,
z_sched_usage_switch(new_thread);

#ifdef CONFIG_SMP
_current_cpu->swap_ok = 0;
new_thread->base.cpu = arch_curr_cpu()->id;

if (!is_spinlock) {
Expand Down

0 comments on commit 568b638

Please sign in to comment.