-
Ludwig Knüpfer authored
Before only the hardware timer's own interrupt was being disabled. This led to a race condition in the following scenario: ``` Thread1: hwtimer_remove() hwtimer_arch_disable_interrupt(); // INTERRUPT -> Thread2 (which has a higher priority than Thread1) gets scheduled Thread2: ... hwtimer_remove() hwtimer_arch_disable_interrupt(); // hwtimer interrupt is already disabled ... hwtimer_arch_enable_interrupt(); ... // yield | terminate -> Thread1 gets scheduled again Thread1: ... // these instructions are being run with the hwtimer interrupt enabled hwtimer_arch_enable_interrupt(); // hwtimer interrupt is already enabled ``` Fixes #924
Ludwig Knüpfer authoredBefore only the hardware timer's own interrupt was being disabled. This led to a race condition in the following scenario: ``` Thread1: hwtimer_remove() hwtimer_arch_disable_interrupt(); // INTERRUPT -> Thread2 (which has a higher priority than Thread1) gets scheduled Thread2: ... hwtimer_remove() hwtimer_arch_disable_interrupt(); // hwtimer interrupt is already disabled ... hwtimer_arch_enable_interrupt(); ... // yield | terminate -> Thread1 gets scheduled again Thread1: ... // these instructions are being run with the hwtimer interrupt enabled hwtimer_arch_enable_interrupt(); // hwtimer interrupt is already enabled ``` Fixes #924