diff --git a/cpu/native/native_cpu.c b/cpu/native/native_cpu.c index 2629e55df067..655562565e77 100644 --- a/cpu/native/native_cpu.c +++ b/cpu/native/native_cpu.c @@ -208,6 +208,8 @@ void isr_thread_yield(void) void thread_yield_higher(void) { + sched_context_switch_request = 1; + if (_native_in_isr == 0) { ucontext_t *ctx = (ucontext_t *)(sched_active_thread->sp); _native_in_isr = 1; @@ -224,9 +226,6 @@ void thread_yield_higher(void) } irq_enable(); } - else { - sched_context_switch_request = 1; - } } void native_cpu_init(void)