From 9a2f69b79cedb37a0bf2df0f15a3eefd1eb4c2c6 Mon Sep 17 00:00:00 2001 From: Marian Buschsieweke Date: Thu, 21 Mar 2019 16:53:53 +0100 Subject: [PATCH] cpu/msp430_common: Cleanup `void cpu_switch_context_exit(void)` assigns `sched_active_thread` just before calling `sched_run()`. This is unneeded, as `sched_run()` will updated that anyway. Also generally speaking, changing internal scheduler data from outside the scheduler is a risky thing to do. --- cpu/msp430_common/cpu.c | 1 - 1 file changed, 1 deletion(-) diff --git a/cpu/msp430_common/cpu.c b/cpu/msp430_common/cpu.c index af2b833702..9ac7a369bb 100644 --- a/cpu/msp430_common/cpu.c +++ b/cpu/msp430_common/cpu.c @@ -55,7 +55,6 @@ void *thread_isr_stack_start(void) NORETURN void cpu_switch_context_exit(void) { - sched_active_thread = sched_threads[0]; sched_run(); __restore_context();