From f930d1a369ecd10f920fab37ef35235e96d164aa Mon Sep 17 00:00:00 2001
From: Terraneo Federico <fede.tft@miosix.org>
Date: Fri, 10 Jan 2025 16:33:37 +0100
Subject: [PATCH] Fix IRQstackOverflowCheck() called in an interrupt that does
 not save context. In Miosix 3 if the timer interrupt causes a context switch,
 it will run the PendSV interrupt that will perform the stack overflow check
 anyway, so the call was also redundant.

---
 miosix/kernel/scheduler/timer_interrupt.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/miosix/kernel/scheduler/timer_interrupt.h b/miosix/kernel/scheduler/timer_interrupt.h
index 83f18eba..1a317a15 100644
--- a/miosix/kernel/scheduler/timer_interrupt.h
+++ b/miosix/kernel/scheduler/timer_interrupt.h
@@ -45,7 +45,6 @@ extern bool IRQwakeThreads(long long currentTime);///\internal Do not use outsid
  */
 inline bool IRQtimerInterrupt(long long currentTime)
 {
-    Thread::IRQstackOverflowCheck();
     bool hptw = IRQwakeThreads(currentTime);
     if(currentTime >= Scheduler::IRQgetNextPreemption() || hptw)
     {
-- 
GitLab