Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions kernel/include/kswap.h
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,8 @@ static ALWAYS_INLINE unsigned int do_swap(unsigned int key,

z_check_stack_sentinel();

old_thread->swap_retval = -EAGAIN;

/* We always take the scheduler spinlock if we don't already
* have it. We "release" other spinlocks here. But we never
* drop the interrupt lock.
Expand All @@ -108,8 +110,6 @@ static ALWAYS_INLINE unsigned int do_swap(unsigned int key,
z_reset_time_slice();
#endif

old_thread->swap_retval = -EAGAIN;

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