From 15a54ae359d342b296b7740dcfaf0580d606b3c6 Mon Sep 17 00:00:00 2001 From: gdisirio Date: Thu, 5 Sep 2013 14:54:24 +0000 Subject: Nil working on M3/M4. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/branches/kernel_3_dev@6265 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/rt/ports/ARMCMx/chcore_v6m.h | 2 +- os/rt/ports/ARMCMx/chcore_v7m.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'os/rt') diff --git a/os/rt/ports/ARMCMx/chcore_v6m.h b/os/rt/ports/ARMCMx/chcore_v6m.h index 62dde2b30..fc53c0202 100644 --- a/os/rt/ports/ARMCMx/chcore_v6m.h +++ b/os/rt/ports/ARMCMx/chcore_v6m.h @@ -264,7 +264,7 @@ struct context { #else #define port_switch(ntp, otp) { \ struct port_intctx *r13 = (struct port_intctx *)__get_PSP(); \ - if ((stkalign_t *)(r13 - 1) < otp->p_stklimit) \ + if ((stkalign_t *)(r13 - 1) < (otp)->p_stklimit) \ chSysHalt("stack overflow"); \ _port_switch(ntp, otp); \ } diff --git a/os/rt/ports/ARMCMx/chcore_v7m.h b/os/rt/ports/ARMCMx/chcore_v7m.h index fb5bd4476..c802a980d 100644 --- a/os/rt/ports/ARMCMx/chcore_v7m.h +++ b/os/rt/ports/ARMCMx/chcore_v7m.h @@ -361,7 +361,7 @@ struct context { #else #define port_switch(ntp, otp) { \ struct port_intctx *r13 = (struct port_intctx *)__get_PSP(); \ - if ((stkalign_t *)(r13 - 1) < otp->p_stklimit) \ + if ((stkalign_t *)(r13 - 1) < (otp)->p_stklimit) \ chSysHalt("stack overflow"); \ _port_switch(ntp, otp); \ } -- cgit v1.2.3