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:
Flavio Ceolin 2018-09-11 18:45:27 -07:00 committed by Anas Nashif
commit 5884c7f54b
9 changed files with 11 additions and 11 deletions

View file

@ -41,7 +41,7 @@ void _impl_k_thread_abort(k_tid_t thread)
if (_current == thread) { if (_current == thread) {
if ((SCB->ICSR & SCB_ICSR_VECTACTIVE_Msk) == 0) { if ((SCB->ICSR & SCB_ICSR_VECTACTIVE_Msk) == 0) {
_Swap(key); (void)_Swap(key);
CODE_UNREACHABLE; CODE_UNREACHABLE;
} else { } else {
SCB->ICSR |= SCB_ICSR_PENDSVSET_Msk; SCB->ICSR |= SCB_ICSR_PENDSVSET_Msk;

View file

@ -511,7 +511,7 @@ void _impl_k_thread_abort(k_tid_t thread)
thread_idx, thread_idx,
__func__); __func__);
_Swap(key); (void)_Swap(key);
CODE_UNREACHABLE; /* LCOV_EXCL_LINE */ CODE_UNREACHABLE; /* LCOV_EXCL_LINE */
} }

View file

@ -95,7 +95,7 @@ void _arch_isr_direct_footer(int swap)
: :
: "memory" : "memory"
); );
_Swap(flags); (void)_Swap(flags);
} }
} }

View file

@ -112,7 +112,7 @@ void posix_irq_handler(void)
&& (hw_irq_ctrl_get_cur_prio() == 256) && (hw_irq_ctrl_get_cur_prio() == 256)
&& (_kernel.ready_q.cache != _current)) { && (_kernel.ready_q.cache != _current)) {
_Swap(irq_lock); (void)_Swap(irq_lock);
} }
} }

View file

@ -387,7 +387,7 @@ static void switch_to_main_thread(void)
* will never be rescheduled in. * will never be rescheduled in.
*/ */
_Swap(irq_lock()); (void)_Swap(irq_lock());
#endif #endif
} }
#endif /* CONFIG_MULTITHREDING */ #endif /* CONFIG_MULTITHREDING */

View file

@ -789,10 +789,10 @@ void _impl_k_yield(void)
} }
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
_Swap(irq_lock()); (void)_Swap(irq_lock());
#else #else
if (_get_next_ready_thread() != _current) { if (_get_next_ready_thread() != _current) {
_Swap(irq_lock()); (void)_Swap(irq_lock());
} }
#endif #endif
} }
@ -827,7 +827,7 @@ void _impl_k_sleep(s32_t duration)
_remove_thread_from_ready_q(_current); _remove_thread_from_ready_q(_current);
_add_thread_timeout(_current, NULL, ticks); _add_thread_timeout(_current, NULL, ticks);
_Swap(key); (void)_Swap(key);
#endif #endif
} }

View file

@ -86,7 +86,7 @@ static void smp_init_top(int key, void *arg)
_arch_curr_cpu()->current = &dummy_thread; _arch_curr_cpu()->current = &dummy_thread;
unsigned int k = irq_lock(); unsigned int k = irq_lock();
smp_timer_init(); smp_timer_init();
_Swap(k); (void)_Swap(k);
CODE_UNREACHABLE; CODE_UNREACHABLE;
} }

View file

@ -510,7 +510,7 @@ void _impl_k_thread_suspend(struct k_thread *thread)
sys_trace_thread_suspend(thread); sys_trace_thread_suspend(thread);
if (thread == _current) { if (thread == _current) {
_Swap(key); (void)_Swap(key);
} else { } else {
irq_unlock(key); irq_unlock(key);
} }

View file

@ -41,7 +41,7 @@ void _impl_k_thread_abort(k_tid_t thread)
irq_unlock(key); irq_unlock(key);
} else { } else {
if (_current == thread) { if (_current == thread) {
_Swap(key); (void)_Swap(key);
CODE_UNREACHABLE; CODE_UNREACHABLE;
} }