diff options
author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2013-09-05 14:54:24 +0000 |
---|---|---|
committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2013-09-05 14:54:24 +0000 |
commit | 15a54ae359d342b296b7740dcfaf0580d606b3c6 (patch) | |
tree | b385117ee6197a6f9efcdfe82ad687c801c61bed /os/nil/ports | |
parent | 986a9d1db14a5d2d4621bd44ece5fd2cfb3482cf (diff) | |
download | ChibiOS-15a54ae359d342b296b7740dcfaf0580d606b3c6.tar.gz ChibiOS-15a54ae359d342b296b7740dcfaf0580d606b3c6.tar.bz2 ChibiOS-15a54ae359d342b296b7740dcfaf0580d606b3c6.zip |
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
Diffstat (limited to 'os/nil/ports')
-rw-r--r-- | os/nil/ports/ARMCMx/nilcore_v6m.h | 7 | ||||
-rw-r--r-- | os/nil/ports/ARMCMx/nilcore_v7m.h | 7 |
2 files changed, 6 insertions, 8 deletions
diff --git a/os/nil/ports/ARMCMx/nilcore_v6m.h b/os/nil/ports/ARMCMx/nilcore_v6m.h index 60a2549a2..159ce9989 100644 --- a/os/nil/ports/ARMCMx/nilcore_v6m.h +++ b/os/nil/ports/ARMCMx/nilcore_v6m.h @@ -192,9 +192,8 @@ struct port_intctx { * @details This code usually setup the context switching frame represented
* by an @p port_intctx structure.
*/
-#define PORT_SETUP_CONTEXT(tp, workspace, wsize, pf, arg) { \
- (tp)->ctxp = (struct port_intctx *)((uint8_t *)workspace + \
- (size_t)wsize - \
+#define PORT_SETUP_CONTEXT(tp, wend, pf, arg) { \
+ (tp)->ctxp = (struct port_intctx *)(((uint8_t *)(wend)) - \
sizeof(struct port_intctx)); \
(tp)->ctxp->r4 = (regarm_t)(pf); \
(tp)->ctxp->r5 = (regarm_t)(arg); \
@@ -254,7 +253,7 @@ struct port_intctx { #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)->stklim) \
chSysHalt("stack overflow"); \
_port_switch(ntp, otp); \
}
diff --git a/os/nil/ports/ARMCMx/nilcore_v7m.h b/os/nil/ports/ARMCMx/nilcore_v7m.h index 4cbcc6e28..0bc4fdf05 100644 --- a/os/nil/ports/ARMCMx/nilcore_v7m.h +++ b/os/nil/ports/ARMCMx/nilcore_v7m.h @@ -291,9 +291,8 @@ struct port_intctx { * @details This code usually setup the context switching frame represented
* by an @p port_intctx structure.
*/
-#define PORT_SETUP_CONTEXT(tp, workspace, wsize, pf, arg) { \
- (tp)->ctxp = (struct port_intctx *)((uint8_t *)workspace + \
- (size_t)wsize - \
+#define PORT_SETUP_CONTEXT(tp, wend, pf, arg) { \
+ (tp)->ctxp = (struct port_intctx *)(((uint8_t *)(wend)) - \
sizeof(struct port_intctx)); \
(tp)->ctxp->r4 = (regarm_t)(pf); \
(tp)->ctxp->r5 = (regarm_t)(arg); \
@@ -351,7 +350,7 @@ struct port_intctx { #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)->stklim) \
chSysHalt("stack overflow"); \
_port_switch(ntp, otp); \
}
|