mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
cpu/avr8_common: fix build with !core_thread
This commit is contained in:
parent
14d0cf5d87
commit
112e378fcc
@ -260,6 +260,10 @@ void NORETURN avr8_enter_thread_mode(void)
|
|||||||
|
|
||||||
void thread_yield_higher(void)
|
void thread_yield_higher(void)
|
||||||
{
|
{
|
||||||
|
if (!IS_USED(MODULE_CORE_THREAD)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (irq_is_in() == 0) {
|
if (irq_is_in() == 0) {
|
||||||
avr8_context_save();
|
avr8_context_save();
|
||||||
sched_run();
|
sched_run();
|
||||||
@ -278,7 +282,8 @@ void avr8_exit_isr(void)
|
|||||||
__asm__ volatile ("" : : : "memory");
|
__asm__ volatile ("" : : : "memory");
|
||||||
|
|
||||||
/* schedule should switch context when returning from a non nested interrupt */
|
/* schedule should switch context when returning from a non nested interrupt */
|
||||||
if (sched_context_switch_request && avr8_state_irq_count == 0) {
|
if (sched_context_switch_request && avr8_state_irq_count == 0 &&
|
||||||
|
IS_USED(MODULE_CORE_THREAD)) {
|
||||||
avr8_context_save();
|
avr8_context_save();
|
||||||
sched_run();
|
sched_run();
|
||||||
avr8_context_restore();
|
avr8_context_restore();
|
||||||
|
Loading…
Reference in New Issue
Block a user