Skip to content

Commit

Permalink
kernel: Simplify clear_halting() on UP systems
Browse files Browse the repository at this point in the history
There is no need for clear_halting() to do anything on UP systems.

Signed-off-by: Peter Mitsis <[email protected]>
  • Loading branch information
peter-mitsis committed Nov 20, 2024
1 parent c98acc1 commit 5657826
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions kernel/sched.c
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,10 @@ static inline bool is_halting(struct k_thread *thread)
/* Clear the halting bits (_THREAD_ABORTING and _THREAD_SUSPENDING) */
static inline void clear_halting(struct k_thread *thread)
{
#if CONFIG_MP_MAX_NUM_CPUS > 1
barrier_dmem_fence_full(); /* Other cpus spin on this locklessly! */
thread->base.thread_state &= ~(_THREAD_ABORTING | _THREAD_SUSPENDING);
#endif
}

static ALWAYS_INLINE struct k_thread *next_up(void)
Expand Down

0 comments on commit 5657826

Please sign in to comment.