Tentative fix for fast interrupts.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@14062 27425a3e-05d8-49a3-a47f-9c15f0e5edd8
This commit is contained in:
parent
f77cc7962a
commit
f8d8a73645
|
@ -202,9 +202,19 @@
|
|||
|
||||
/**
|
||||
* @brief Simplified priority handling flag.
|
||||
* @details Activating this option makes the Kernel work in compact mode.
|
||||
* In compact mode interrupts are disabled globally instead of
|
||||
* raising the priority mask to some intermediate level.
|
||||
* @details When this option is disabled:
|
||||
* - Interrupts are not disabled globally, the priority mask BASEPRI
|
||||
* is raised up to CORTEX_BASEPRI_KERNEL instead.
|
||||
* - An extra structure @p port_extctx is allocated for each thread
|
||||
* in order to allow safe processing of fast interrupts.
|
||||
* .
|
||||
* When this option is enabled:
|
||||
* - Interrupts are disabled globally instead of
|
||||
* raising the priority mask, this makes code generally more
|
||||
* compact and faster. There is no extra @p port_extctx structure
|
||||
* so less RAM is used.
|
||||
* - There is no support for fast interrupts.
|
||||
* .
|
||||
*/
|
||||
#if !defined(CORTEX_SIMPLIFIED_PRIORITY)
|
||||
#define CORTEX_SIMPLIFIED_PRIORITY FALSE
|
||||
|
@ -610,13 +620,24 @@ struct port_context {
|
|||
__PORT_SETUP_CONTEXT_SYSCALL(tp, wtop); \
|
||||
} while (0)
|
||||
|
||||
/**
|
||||
* @brief Context switch area size.
|
||||
*/
|
||||
#if (CORTEX_SIMPLIFIED_PRIORITY == TRUE) || defined(__DOXYGEN__)
|
||||
#define PORT_WA_CTX_SIZE (sizeof (struct port_intctx) + \
|
||||
sizeof (struct port_extctx))
|
||||
#else
|
||||
#define PORT_WA_CTX_SIZE (sizeof (struct port_intctx) + \
|
||||
sizeof (struct port_extctx) + \
|
||||
sizeof (struct port_extctx))
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Computes the thread working area global size.
|
||||
* @note There is no need to perform alignments in this macro.
|
||||
*/
|
||||
#define PORT_WA_SIZE(n) ((size_t)PORT_GUARD_PAGE_SIZE + \
|
||||
sizeof (struct port_intctx) + \
|
||||
sizeof (struct port_extctx) + \
|
||||
(size_t)PORT_WA_CTX_SIZE + \
|
||||
(size_t)(n) + \
|
||||
(size_t)PORT_INT_REQUIRED_STACK)
|
||||
|
||||
|
|
Loading…
Reference in New Issue