kernel: Simplify clear_halting() on UP systems
There is no need for clear_halting() to do anything on UP systems. Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
This commit is contained in:
parent
85a9cffd0f
commit
af14e120a5
1 changed files with 4 additions and 2 deletions
|
|
@ -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)
|
||||
{
|
||||
barrier_dmem_fence_full(); /* Other cpus spin on this locklessly! */
|
||||
thread->base.thread_state &= ~(_THREAD_ABORTING | _THREAD_SUSPENDING);
|
||||
if (IS_ENABLED(CONFIG_SMP) && (CONFIG_MP_MAX_NUM_CPUS > 1)) {
|
||||
barrier_dmem_fence_full(); /* Other cpus spin on this locklessly! */
|
||||
thread->base.thread_state &= ~(_THREAD_ABORTING | _THREAD_SUSPENDING);
|
||||
}
|
||||
}
|
||||
|
||||
static ALWAYS_INLINE struct k_thread *next_up(void)
|
||||
|
|
|
|||
Loading…
Reference in a new issue