aboutsummaryrefslogtreecommitdiffstats
path: root/os/rt/ports/ARMCMx/chcore_v7m.h
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2013-09-02 12:10:10 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2013-09-02 12:10:10 +0000
commit56b4e6432b20f5e7b46a7699e7e47aff3b042e16 (patch)
tree13e3042ee8a9a1bdf2db12b2c77c12ccd76f85ab /os/rt/ports/ARMCMx/chcore_v7m.h
parent566b04ad79eaada7dbd81d7d89f2bfc4505d27d1 (diff)
downloadChibiOS-56b4e6432b20f5e7b46a7699e7e47aff3b042e16.tar.gz
ChibiOS-56b4e6432b20f5e7b46a7699e7e47aff3b042e16.tar.bz2
ChibiOS-56b4e6432b20f5e7b46a7699e7e47aff3b042e16.zip
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/branches/kernel_3_dev@6248 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/rt/ports/ARMCMx/chcore_v7m.h')
-rw-r--r--os/rt/ports/ARMCMx/chcore_v7m.h25
1 files changed, 13 insertions, 12 deletions
diff --git a/os/rt/ports/ARMCMx/chcore_v7m.h b/os/rt/ports/ARMCMx/chcore_v7m.h
index dfd6413ce..c2c47024f 100644
--- a/os/rt/ports/ARMCMx/chcore_v7m.h
+++ b/os/rt/ports/ARMCMx/chcore_v7m.h
@@ -219,7 +219,7 @@ typedef void *regarm_t;
typedef uint64_t stkalign_t;
-struct extctx {
+struct port_extctx {
regarm_t r0;
regarm_t r1;
regarm_t r2;
@@ -250,7 +250,7 @@ struct extctx {
#endif /* CORTEX_USE_FPU */
};
-struct intctx {
+struct port_intctx {
#if CORTEX_USE_FPU
regarm_t s16;
regarm_t s17;
@@ -284,11 +284,12 @@ struct intctx {
/**
* @brief Platform dependent part of the @p thread_t structure.
- * @details In this port the structure just holds a pointer to the @p intctx
- * structure representing the stack pointer at context switch time.
+ * @details In this port the structure just holds a pointer to the
+ * @p port_intctx structure representing the stack pointer
+ * at context switch time.
*/
struct context {
- struct intctx *r13;
+ struct port_intctx *r13;
};
/*===========================================================================*/
@@ -298,12 +299,12 @@ struct context {
/**
* @brief Platform dependent part of the @p chThdCreateI() API.
* @details This code usually setup the context switching frame represented
- * by an @p intctx structure.
+ * by an @p port_intctx structure.
*/
#define SETUP_CONTEXT(workspace, wsize, pf, arg) { \
- tp->p_ctx.r13 = (struct intctx *)((uint8_t *)workspace + \
- wsize - \
- sizeof(struct intctx)); \
+ tp->p_ctx.r13 = (struct port_intctx *)((uint8_t *)workspace + \
+ wsize - \
+ sizeof(struct port_intctx)); \
tp->p_ctx.r13->r4 = (void *)(pf); \
tp->p_ctx.r13->r5 = (void *)(arg); \
tp->p_ctx.r13->lr = (void *)(_port_thread_start); \
@@ -318,8 +319,8 @@ struct context {
* @brief Computes the thread working area global size.
*/
#define THD_WA_SIZE(n) STACK_ALIGN(sizeof(thread_t) + \
- sizeof(struct intctx) + \
- sizeof(struct extctx) + \
+ sizeof(struct port_intctx) + \
+ sizeof(struct port_extctx) + \
(n) + (CH_PORT_INT_REQUIRED_STACK))
/**
@@ -371,7 +372,7 @@ struct context {
#define port_switch(ntp, otp) _port_switch(ntp, otp)
#else
#define port_switch(ntp, otp) { \
- struct intctx *r13 = (struct intctx *)__get_PSP(); \
+ struct port_intctx *r13 = (struct port_intctx *)__get_PSP(); \
if ((stkalign_t *)(r13 - 1) < otp->p_stklimit) \
chSysHalt("stack overflow"); \
_port_switch(ntp, otp); \