kernel: Explicitly ignoring _Swap return
Ignoring _Swap return where there is no treatment or nothing to do. Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
This commit is contained in:
parent
8a9ba10c2c
commit
5884c7f54b
9 changed files with 11 additions and 11 deletions
|
@ -41,7 +41,7 @@ void _impl_k_thread_abort(k_tid_t thread)
|
|||
|
||||
if (_current == thread) {
|
||||
if ((SCB->ICSR & SCB_ICSR_VECTACTIVE_Msk) == 0) {
|
||||
_Swap(key);
|
||||
(void)_Swap(key);
|
||||
CODE_UNREACHABLE;
|
||||
} else {
|
||||
SCB->ICSR |= SCB_ICSR_PENDSVSET_Msk;
|
||||
|
|
|
@ -511,7 +511,7 @@ void _impl_k_thread_abort(k_tid_t thread)
|
|||
thread_idx,
|
||||
__func__);
|
||||
|
||||
_Swap(key);
|
||||
(void)_Swap(key);
|
||||
CODE_UNREACHABLE; /* LCOV_EXCL_LINE */
|
||||
}
|
||||
|
||||
|
|
|
@ -95,7 +95,7 @@ void _arch_isr_direct_footer(int swap)
|
|||
:
|
||||
: "memory"
|
||||
);
|
||||
_Swap(flags);
|
||||
(void)_Swap(flags);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -112,7 +112,7 @@ void posix_irq_handler(void)
|
|||
&& (hw_irq_ctrl_get_cur_prio() == 256)
|
||||
&& (_kernel.ready_q.cache != _current)) {
|
||||
|
||||
_Swap(irq_lock);
|
||||
(void)_Swap(irq_lock);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -387,7 +387,7 @@ static void switch_to_main_thread(void)
|
|||
* will never be rescheduled in.
|
||||
*/
|
||||
|
||||
_Swap(irq_lock());
|
||||
(void)_Swap(irq_lock());
|
||||
#endif
|
||||
}
|
||||
#endif /* CONFIG_MULTITHREDING */
|
||||
|
|
|
@ -789,10 +789,10 @@ void _impl_k_yield(void)
|
|||
}
|
||||
|
||||
#ifdef CONFIG_SMP
|
||||
_Swap(irq_lock());
|
||||
(void)_Swap(irq_lock());
|
||||
#else
|
||||
if (_get_next_ready_thread() != _current) {
|
||||
_Swap(irq_lock());
|
||||
(void)_Swap(irq_lock());
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
@ -827,7 +827,7 @@ void _impl_k_sleep(s32_t duration)
|
|||
_remove_thread_from_ready_q(_current);
|
||||
_add_thread_timeout(_current, NULL, ticks);
|
||||
|
||||
_Swap(key);
|
||||
(void)_Swap(key);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
@ -86,7 +86,7 @@ static void smp_init_top(int key, void *arg)
|
|||
_arch_curr_cpu()->current = &dummy_thread;
|
||||
unsigned int k = irq_lock();
|
||||
smp_timer_init();
|
||||
_Swap(k);
|
||||
(void)_Swap(k);
|
||||
|
||||
CODE_UNREACHABLE;
|
||||
}
|
||||
|
|
|
@ -510,7 +510,7 @@ void _impl_k_thread_suspend(struct k_thread *thread)
|
|||
sys_trace_thread_suspend(thread);
|
||||
|
||||
if (thread == _current) {
|
||||
_Swap(key);
|
||||
(void)_Swap(key);
|
||||
} else {
|
||||
irq_unlock(key);
|
||||
}
|
||||
|
|
|
@ -41,7 +41,7 @@ void _impl_k_thread_abort(k_tid_t thread)
|
|||
irq_unlock(key);
|
||||
} else {
|
||||
if (_current == thread) {
|
||||
_Swap(key);
|
||||
(void)_Swap(key);
|
||||
CODE_UNREACHABLE;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue