Skip to content

Commit 568b638

Browse files
peter-mitsiskartben
authored andcommitted
kernel: Remove clearing of swap_ok in do_swap()
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 <[email protected]>
1 parent bfe0b74 commit 568b638

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

kernel/include/kswap.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,6 @@ static ALWAYS_INLINE unsigned int do_swap(unsigned int key,
124124
z_sched_usage_switch(new_thread);
125125

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

130129
if (!is_spinlock) {

0 commit comments

Comments
 (0)