From 9741231ed794ed6825795e34a35c3391fbc32830 Mon Sep 17 00:00:00 2001 From: gdisirio Date: Sun, 14 Aug 2011 12:27:46 +0000 Subject: git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@3234 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/ports/IAR/ARMCMx/chcore_v6m.h | 2 +- os/ports/IAR/ARMCMx/chcore_v7m.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'os/ports/IAR') diff --git a/os/ports/IAR/ARMCMx/chcore_v6m.h b/os/ports/IAR/ARMCMx/chcore_v6m.h index a25fde1ef..0480451c0 100644 --- a/os/ports/IAR/ARMCMx/chcore_v6m.h +++ b/os/ports/IAR/ARMCMx/chcore_v6m.h @@ -240,7 +240,7 @@ struct intctx { #define port_switch(ntp, otp) _port_switch(ntp, otp) #else #define port_switch(ntp, otp) { \ - if ((void *)(__get_SP() - sizeof(struct intctx)) < (void *)(otp + 1)) \ + if ((stkalign_t *)(__get_SP() - sizeof(struct intctx)) < otp->p_stklimit) \ chDbgPanic("stack overflow"); \ _port_switch(ntp, otp); \ } diff --git a/os/ports/IAR/ARMCMx/chcore_v7m.h b/os/ports/IAR/ARMCMx/chcore_v7m.h index 059f29711..086a99d39 100644 --- a/os/ports/IAR/ARMCMx/chcore_v7m.h +++ b/os/ports/IAR/ARMCMx/chcore_v7m.h @@ -306,7 +306,7 @@ struct intctx { #define port_switch(ntp, otp) _port_switch(ntp, otp) #else #define port_switch(ntp, otp) { \ - if ((void *)(__get_SP() - sizeof(struct intctx)) < (void *)(otp + 1)) \ + if ((stkalign_t *)(__get_SP() - sizeof(struct intctx)) < otp->p_stklimit) \ chDbgPanic("stack overflow"); \ _port_switch(ntp, otp); \ } -- cgit v1.2.3