diff options
Diffstat (limited to 'os/rt/ports')
-rw-r--r-- | os/rt/ports/ARMCMx/chcore.h | 8 | ||||
-rw-r--r-- | os/rt/ports/ARMCMx/chcore_v6m.h | 6 | ||||
-rw-r--r-- | os/rt/ports/ARMCMx/chcore_v7m.h | 4 | ||||
-rw-r--r-- | os/rt/ports/e200/chcore.h | 4 |
4 files changed, 15 insertions, 7 deletions
diff --git a/os/rt/ports/ARMCMx/chcore.h b/os/rt/ports/ARMCMx/chcore.h index ca6ae60e7..0e5ed6933 100644 --- a/os/rt/ports/ARMCMx/chcore.h +++ b/os/rt/ports/ARMCMx/chcore.h @@ -42,6 +42,11 @@ */
#define PORT_ARCHITECTURE_ARM
+/* The following code is not processed when the file is included from an
+ asm module because those intrinsic macros are not necessarily defined
+ by the assembler too.*/
+#if !defined(_FROM_ASM_)
+
/**
* @brief Compiler name and version.
*/
@@ -57,6 +62,9 @@ #else
#error "unsupported compiler"
#endif
+
+#endif /* !defined(_FROM_ASM_) */
+
/** @} */
/**
diff --git a/os/rt/ports/ARMCMx/chcore_v6m.h b/os/rt/ports/ARMCMx/chcore_v6m.h index e80efc9b9..fa6476084 100644 --- a/os/rt/ports/ARMCMx/chcore_v6m.h +++ b/os/rt/ports/ARMCMx/chcore_v6m.h @@ -254,7 +254,7 @@ struct port_intctx { struct port_intctx *r13 = (struct port_intctx *)__get_PSP(); \
if ((stkalign_t *)(r13 - 1) < (otp)->p_stklimit) \
chSysHalt("stack overflow"); \
- _port_switch(ntp, otp); \
+ _port_switch((void *)ntp, (void *)otp); \
}
#endif
@@ -266,10 +266,10 @@ struct port_intctx { extern "C" {
#endif
void _port_irq_epilogue(regarm_t lr);
+ void _port_switch(void *ntp, void *otp);
+ void _port_thread_start(void);
void _port_switch_from_isr(void);
void _port_exit_from_isr(void);
- void _port_switch(thread_t *ntp, thread_t *otp);
- void _port_thread_start(void);
#ifdef __cplusplus
}
#endif
diff --git a/os/rt/ports/ARMCMx/chcore_v7m.h b/os/rt/ports/ARMCMx/chcore_v7m.h index 404e87411..9e0b1e9cd 100644 --- a/os/rt/ports/ARMCMx/chcore_v7m.h +++ b/os/rt/ports/ARMCMx/chcore_v7m.h @@ -344,7 +344,7 @@ struct port_intctx { struct port_intctx *r13 = (struct port_intctx *)__get_PSP(); \
if ((stkalign_t *)(r13 - 1) < (otp)->p_stklimit) \
chSysHalt("stack overflow"); \
- _port_switch(ntp, otp); \
+ _port_switch((void *)ntp, (void *)otp); \
}
#endif
@@ -356,7 +356,7 @@ struct port_intctx { extern "C" {
#endif
void _port_irq_epilogue(void);
- void _port_switch(thread_t *ntp, thread_t *otp);
+ void _port_switch(void *ntp, void *otp);
void _port_thread_start(void);
void _port_switch_from_isr(void);
void _port_exit_from_isr(void);
diff --git a/os/rt/ports/e200/chcore.h b/os/rt/ports/e200/chcore.h index 0255a0f1d..a043bb0b0 100644 --- a/os/rt/ports/e200/chcore.h +++ b/os/rt/ports/e200/chcore.h @@ -340,7 +340,7 @@ struct context { register struct port_intctx *sp asm ("%r1"); \
if ((stkalign_t *)(sp - 1) < otp->p_stklimit) \
chDbgPanic("stack overflow"); \
- _port_switch(ntp, otp); \
+ _port_switch((void *)ntp, (void *)otp); \
}
#endif
@@ -373,7 +373,7 @@ struct context { #ifdef __cplusplus
extern "C" {
#endif
- void _port_switch(thread_t *ntp, thread_t *otp);
+ void _port_switch(void *ntp, void *otp);
void _port_thread_start(void);
#ifdef __cplusplus
}
|