git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@642 35acf78f-673a-0410-8e92-d51de3d6d3f4

This commit is contained in:
gdisirio 2009-01-19 10:41:54 +00:00
parent de5e04fc61
commit f8b4fca89a
6 changed files with 35 additions and 18 deletions

View File

@ -48,8 +48,8 @@ typedef uint32_t stkalign_t;
*/
typedef void *regarm_t;
/** @cond never */
/**
* Interrupt saved context.
* This structure represents the stack frame saved during a preemption-capable
* interrupt handler.
*/
@ -63,9 +63,10 @@ struct extctx {
regarm_t r12;
regarm_t lr_usr;
};
/** @endcond */
/** @cond never */
/**
* System saved context.
* This structure represents the inner stack frame during a context switching.
*/
struct intctx {
@ -81,15 +82,17 @@ struct intctx {
regarm_t r11;
regarm_t lr;
};
/** @endcond */
/** @cond never */
/**
* Platform dependent part of the @p Thread structure.
* In the ARM7 port this structure contains just the copy of the user mode
* stack pointer.
*/
typedef struct {
struct context {
struct intctx *r13;
} Context;
};
/** @endcond */
/**
* Platform dependent part of the @p chThdInit() API.

View File

@ -96,14 +96,16 @@ typedef uint32_t stkalign_t;
*/
typedef void *regarm_t;
/** @cond never */
/**
* Interrupt saved context, empty in this architecture.
*/
struct extctx {
};
/** @endcond */
/** @cond never */
/**
* System saved context.
* This structure represents the inner stack frame during a context switching.
*/
struct intctx {
@ -128,13 +130,16 @@ struct intctx {
regarm_t pc;
regarm_t xpsr;
};
/** @endcond */
/** @cond never */
/**
* Cortex-M3 context structure.
*/
typedef struct {
struct context {
struct intctx *r13;
} Context;
};
/** @endcond */
/**
* Platform dependent part of the @p chThdInit() API.

View File

@ -45,6 +45,7 @@
*/
typedef uint8_t stkalign_t;
/** @cond never */
/**
* Interrupt saved context.
* @note The field @p _next is not part of the context, it represents the
@ -69,7 +70,9 @@ struct extctx {
uint8_t r0;
uint16_t pc;
};
/** @endcond */
/** @cond never */
/**
* System saved context.
* @note The field @p _next is not part of the context, it represents the
@ -100,15 +103,17 @@ struct intctx {
uint8_t pcl;
uint8_t pch;
};
/** @endcond */
/** @cond never */
/**
* Platform dependent part of the @p Thread structure.
* In the AVR port this structure just holds a pointer to the @p intctx
* structure representing the stack pointer at the time of the context switch.
*/
typedef struct {
struct context {
struct intctx *sp;
} Context;
};
/** @endcond */
/**
* Platform dependent part of the @p chThdInit() API.

View File

@ -50,6 +50,7 @@ typedef uint16_t stkalign_t;
*/
typedef void *regmsp_t;
/** @cond never */
/**
* Interrupt saved context.
*/
@ -61,9 +62,10 @@ struct extctx {
regmsp_t sr;
regmsp_t pc;
};
/** @endcond */
/** @cond never */
/**
* System saved context.
* This structure represents the inner stack frame during a context switching.
*/
struct intctx {
@ -77,15 +79,17 @@ struct intctx {
regmsp_t r11;
regmsp_t pc;
};
/** @endcond */
/** @cond never */
/**
* Platform dependent part of the @p Thread structure.
* In the MSP430 port this structure just holds a pointer to the @p intctx
* structure representing the stack pointer at the time of the context switch.
*/
typedef struct {
struct context {
struct intctx *sp;
} Context;
};
/** @endcond */
/**
* Platform dependent part of the @p chThdInit() API.

View File

@ -49,7 +49,7 @@ struct Thread {
/** Mode flags. */
tmode_t p_flags;
/** Machine dependent processor context.*/
Context p_ctx;
struct context p_ctx;
#ifdef CH_USE_NESTED_LOCKS
cnt_t p_locks;
#endif

View File

@ -57,9 +57,9 @@ struct intctx {
* This structure usually contains just the saved stack pointer defined as a
* pointer to a @p intctx structure.
*/
typedef struct {
struct context {
struct intctx *sp;
} Context;
};
/**
* Platform dependent part of the @p chThdInit() API.