From 9431f33b577f2e920900d167233423ca2e5de7b5 Mon Sep 17 00:00:00 2001 From: Terraneo Federico <fede.tft@miosix.org> Date: Thu, 12 May 2016 17:32:23 +0200 Subject: [PATCH] Renamed tick_interrupt.h to timer_interrupt.h, renamed IRQtickInterrupt() to IRQtimerInterrupt(), removed calls to IRQstackOverflowCheck() in ISR_preempt, they are now moved in IRQtimerInterrupt() --- .../interfaces-impl/portability.cpp | 5 ++--- .../common/interfaces-impl/portability.cpp | 5 ++--- .../common/interfaces-impl/portability.cpp | 5 ++--- .../common/interfaces-impl/portability.cpp | 5 ++--- .../common/interfaces-impl/portability.cpp | 5 ++--- .../common/interfaces-impl/cstimer.cpp | 4 ++-- .../common/interfaces-impl/portability.cpp | 5 ++--- .../scheduler/{tick_interrupt.h => timer_interrupt.h} | 10 ++++------ 8 files changed, 18 insertions(+), 26 deletions(-) rename miosix/kernel/scheduler/{tick_interrupt.h => timer_interrupt.h} (96%) diff --git a/miosix/arch/arm7_lpc2000/lpc2138_miosix_board/interfaces-impl/portability.cpp b/miosix/arch/arm7_lpc2000/lpc2138_miosix_board/interfaces-impl/portability.cpp index a5487a33..9335dde5 100644 --- a/miosix/arch/arm7_lpc2000/lpc2138_miosix_board/interfaces-impl/portability.cpp +++ b/miosix/arch/arm7_lpc2000/lpc2138_miosix_board/interfaces-impl/portability.cpp @@ -34,7 +34,7 @@ #include "miosix.h" #include "portability_impl.h" #include "kernel/scheduler/scheduler.h" -#include "kernel/scheduler/tick_interrupt.h" +#include "kernel/scheduler/timer_interrupt.h" #include "board_settings.h" #include <algorithm> @@ -55,8 +55,7 @@ void ISR_preempt() T0IR=0x1;//Clear interrupt VICVectAddr=0xff;//Restart VIC - IRQstackOverflowCheck(); - miosix::IRQtickInterrupt(); + miosix::IRQtimerInterrupt(); } /** diff --git a/miosix/arch/cortexM3_efm32gg/common/interfaces-impl/portability.cpp b/miosix/arch/cortexM3_efm32gg/common/interfaces-impl/portability.cpp index fe82af9e..c5312beb 100644 --- a/miosix/arch/cortexM3_efm32gg/common/interfaces-impl/portability.cpp +++ b/miosix/arch/cortexM3_efm32gg/common/interfaces-impl/portability.cpp @@ -31,7 +31,7 @@ #include "kernel/error.h" #include "interfaces/bsp.h" #include "kernel/scheduler/scheduler.h" -#include "kernel/scheduler/tick_interrupt.h" +#include "kernel/scheduler/timer_interrupt.h" #include <algorithm> /** @@ -97,8 +97,7 @@ namespace miosix_private { void ISR_preempt() __attribute__((noinline)); void ISR_preempt() { - IRQstackOverflowCheck(); - miosix::IRQtickInterrupt(); + miosix::IRQtimerInterrupt(); } /** diff --git a/miosix/arch/cortexM3_stm32/common/interfaces-impl/portability.cpp b/miosix/arch/cortexM3_stm32/common/interfaces-impl/portability.cpp index 0ff10b47..7b5b2098 100644 --- a/miosix/arch/cortexM3_stm32/common/interfaces-impl/portability.cpp +++ b/miosix/arch/cortexM3_stm32/common/interfaces-impl/portability.cpp @@ -31,7 +31,7 @@ #include "kernel/error.h" #include "interfaces/bsp.h" #include "kernel/scheduler/scheduler.h" -#include "kernel/scheduler/tick_interrupt.h" +#include "kernel/scheduler/timer_interrupt.h" #include <algorithm> /** @@ -97,8 +97,7 @@ namespace miosix_private { void ISR_preempt() __attribute__((noinline)); void ISR_preempt() { - IRQstackOverflowCheck(); - miosix::IRQtickInterrupt(); + miosix::IRQtimerInterrupt(); } /** diff --git a/miosix/arch/cortexM3_stm32f2/common/interfaces-impl/portability.cpp b/miosix/arch/cortexM3_stm32f2/common/interfaces-impl/portability.cpp index 7aedfb82..c7f4c9e9 100644 --- a/miosix/arch/cortexM3_stm32f2/common/interfaces-impl/portability.cpp +++ b/miosix/arch/cortexM3_stm32f2/common/interfaces-impl/portability.cpp @@ -31,7 +31,7 @@ #include "kernel/error.h" #include "interfaces/bsp.h" #include "kernel/scheduler/scheduler.h" -#include "kernel/scheduler/tick_interrupt.h" +#include "kernel/scheduler/timer_interrupt.h" #include "core/interrupts.h" #include "kernel/process.h" #include <algorithm> @@ -102,8 +102,7 @@ namespace miosix_private { void ISR_preempt() __attribute__((noinline)); void ISR_preempt() { - IRQstackOverflowCheck(); - miosix::IRQtickInterrupt(); + miosix::IRQtimerInterrupt(); } /** diff --git a/miosix/arch/cortexM3_stm32l1/common/interfaces-impl/portability.cpp b/miosix/arch/cortexM3_stm32l1/common/interfaces-impl/portability.cpp index b408798c..a3a9cd1b 100644 --- a/miosix/arch/cortexM3_stm32l1/common/interfaces-impl/portability.cpp +++ b/miosix/arch/cortexM3_stm32l1/common/interfaces-impl/portability.cpp @@ -31,7 +31,7 @@ #include "kernel/error.h" #include "interfaces/bsp.h" #include "kernel/scheduler/scheduler.h" -#include "kernel/scheduler/tick_interrupt.h" +#include "kernel/scheduler/timer_interrupt.h" #include <algorithm> /** @@ -97,8 +97,7 @@ namespace miosix_private { void ISR_preempt() __attribute__((noinline)); void ISR_preempt() { - IRQstackOverflowCheck(); - miosix::IRQtickInterrupt(); + miosix::IRQtimerInterrupt(); } /** diff --git a/miosix/arch/cortexM4_stm32f4/common/interfaces-impl/cstimer.cpp b/miosix/arch/cortexM4_stm32f4/common/interfaces-impl/cstimer.cpp index 14160656..8bbbce9c 100644 --- a/miosix/arch/cortexM4_stm32f4/common/interfaces-impl/cstimer.cpp +++ b/miosix/arch/cortexM4_stm32f4/common/interfaces-impl/cstimer.cpp @@ -3,7 +3,7 @@ #include "interfaces/portability.h" #include "kernel/kernel.h" #include "kernel/logging.h" -#include "kernel/scheduler/tick_interrupt.h" +#include "kernel/scheduler/timer_interrupt.h" #include <cstdlib> using namespace miosix; @@ -80,7 +80,7 @@ void __attribute__((used)) cstirqhnd() csRecord.wakeup_time += CST_QUANTUM; IRQaddToSleepingList(&csRecord); //It would also set the next timer interrupt } - IRQtickInterrupt(); + IRQtimerInterrupt(); } } diff --git a/miosix/arch/cortexM4_stm32f4/common/interfaces-impl/portability.cpp b/miosix/arch/cortexM4_stm32f4/common/interfaces-impl/portability.cpp index b1d5c2c0..3fe65752 100644 --- a/miosix/arch/cortexM4_stm32f4/common/interfaces-impl/portability.cpp +++ b/miosix/arch/cortexM4_stm32f4/common/interfaces-impl/portability.cpp @@ -31,7 +31,7 @@ #include "kernel/error.h" #include "interfaces/bsp.h" #include "kernel/scheduler/scheduler.h" -#include "kernel/scheduler/tick_interrupt.h" +#include "kernel/scheduler/timer_interrupt.h" #include "core/interrupts.h" #include "kernel/process.h" #include <algorithm> @@ -106,8 +106,7 @@ namespace miosix_private { void ISR_preempt() __attribute__((noinline)); void ISR_preempt() { - IRQstackOverflowCheck(); - miosix::IRQtickInterrupt(); + miosix::IRQtimerInterrupt(); } #endif //USE_CSTIMER diff --git a/miosix/kernel/scheduler/tick_interrupt.h b/miosix/kernel/scheduler/timer_interrupt.h similarity index 96% rename from miosix/kernel/scheduler/tick_interrupt.h rename to miosix/kernel/scheduler/timer_interrupt.h index 0a2bbf2a..bd0d94ce 100644 --- a/miosix/kernel/scheduler/tick_interrupt.h +++ b/miosix/kernel/scheduler/timer_interrupt.h @@ -25,8 +25,8 @@ * along with this program; if not, see <http://www.gnu.org/licenses/> * ***************************************************************************/ -#ifndef TICK_INTERRUPT_H -#define TICK_INTERRUPT_H +#ifndef TIMER_INTERRUPT_H +#define TIMER_INTERRUPT_H #include "config/miosix_settings.h" #include "interfaces/portability.h" @@ -42,11 +42,9 @@ extern volatile bool tick_skew;///\internal Do not use outside the kernel extern volatile Thread *cur;///\internal Do not use outside the kernel extern bool IRQwakeThreads();///\internal Do not use outside the kernel -inline void IRQtickInterrupt() +inline void IRQtimerInterrupt() { - #ifdef USE_CSTIMER miosix_private::IRQstackOverflowCheck(); - #endif //USE_CSTIMER bool woken=IRQwakeThreads();//Increment tick and wake threads,if any (void)woken; //Avoid unused variable warning. @@ -78,4 +76,4 @@ inline void IRQtickInterrupt() } -#endif //TICK_INTERRUPT_H +#endif //TIMER_INTERRUPT_H -- GitLab