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

master
gdisirio 2013-07-20 18:13:52 +00:00
parent cb5416a660
commit 56ca204ed2
11 changed files with 24 additions and 24 deletions

View File

@ -123,7 +123,7 @@ void _port_init(void) {
CORTEX_PRIORITY_MASK(CORTEX_PRIORITY_SYSTICK));
}
#if !CH_OPTIMIZE_SPEED
#if !CH_CFG_OPTIMIZE_SPEED
void _port_lock(void) {
register uint32_t tmp asm ("r3") = CORTEX_BASEPRI_KERNEL;
asm volatile ("msr BASEPRI, %0" : : "r" (tmp) : "memory");

View File

@ -373,16 +373,16 @@ struct context {
* @note In this port this it raises the base priority to kernel level.
*/
#if !CORTEX_SIMPLIFIED_PRIORITY || defined(__DOXYGEN__)
#if CH_OPTIMIZE_SPEED || defined(__DOXYGEN__)
#if CH_CFG_OPTIMIZE_SPEED || defined(__DOXYGEN__)
#define port_lock() { \
register uint32_t tmp asm ("r3") = CORTEX_BASEPRI_KERNEL; \
asm volatile ("msr BASEPRI, %0" : : "r" (tmp) : "memory"); \
}
#else /* !CH_OPTIMIZE_SPEED */
#else /* !CH_CFG_OPTIMIZE_SPEED */
#define port_lock() { \
asm volatile ("bl _port_lock" : : : "r3", "lr", "memory"); \
}
#endif /* !CH_OPTIMIZE_SPEED */
#endif /* !CH_CFG_OPTIMIZE_SPEED */
#else /* CORTEX_SIMPLIFIED_PRIORITY */
#define port_lock() asm volatile ("cpsid i" : : : "memory")
#endif /* CORTEX_SIMPLIFIED_PRIORITY */
@ -394,16 +394,16 @@ struct context {
* @note In this port this it lowers the base priority to user level.
*/
#if !CORTEX_SIMPLIFIED_PRIORITY || defined(__DOXYGEN__)
#if CH_OPTIMIZE_SPEED || defined(__DOXYGEN__)
#if CH_CFG_OPTIMIZE_SPEED || defined(__DOXYGEN__)
#define port_unlock() { \
register uint32_t tmp asm ("r3") = CORTEX_BASEPRI_DISABLED; \
asm volatile ("msr BASEPRI, %0" : : "r" (tmp) : "memory"); \
}
#else /* !CH_OPTIMIZE_SPEED */
#else /* !CH_CFG_OPTIMIZE_SPEED */
#define port_unlock() { \
asm volatile ("bl _port_unlock" : : : "r3", "lr", "memory"); \
}
#endif /* !CH_OPTIMIZE_SPEED */
#endif /* !CH_CFG_OPTIMIZE_SPEED */
#else /* CORTEX_SIMPLIFIED_PRIORITY */
#define port_unlock() asm volatile ("cpsie i" : : : "memory")
#endif /* CORTEX_SIMPLIFIED_PRIORITY */
@ -510,7 +510,7 @@ extern "C" {
void _port_exit_from_isr(void);
void _port_switch(thread_t *ntp, thread_t *otp);
void _port_thread_start(void);
#if !CH_OPTIMIZE_SPEED
#if !CH_CFG_OPTIMIZE_SPEED
void _port_lock(void);
void _port_unlock(void);
#endif

View File

@ -237,7 +237,7 @@
* stack checking is enabled (<tt>CH_DBG_ENABLE_STACK_CHECK==TRUE</tt>),
* it is an alias of @p __process_stack_base__ in this port.
* - @p __heap_base__ and @p __heap_end__, those symbols are required
* if the memory core manager is enabled (<tt>CH_USE_MEMCORE==TRUE</tt>)
* if the memory core manager is enabled (<tt>CH_CFG_USE_MEMCORE==TRUE</tt>)
* with a default core size set to zero (<tt>CH_MEMCORE_SIZE==0</tt>).
* .
* @ingroup ARMCMx

View File

@ -170,17 +170,17 @@ struct intctx {};
*/
#define PORT_OPTIMIZED_ISPREEMPTIONREQUIRED
#if (CH_TIME_QUANTUM > 0) || defined(__DOXYGEN__)
#if (CH_CFG_TIME_QUANTUM > 0) || defined(__DOXYGEN__)
/**
* @brief Inline-able version of this kernel function.
*/
#define chSchIsPreemptionRequired() \
(currp->p_preempt ? firstprio(&rlist.r_queue) > currp->p_prio : \
firstprio(&rlist.r_queue) >= currp->p_prio)
#else /* CH_TIME_QUANTUM == 0 */
#else /* CH_CFG_TIME_QUANTUM == 0 */
#define chSchIsPreemptionRequired() \
(firstprio(&rlist.r_queue) > currp->p_prio)
#endif /* CH_TIME_QUANTUM == 0 */
#endif /* CH_CFG_TIME_QUANTUM == 0 */
#endif /* _FROM_ASM_ */

View File

@ -322,12 +322,12 @@ typedef struct {
ThreadsQueue r_queue;
tprio_t r_prio;
Thread *r_current;
#if CH_USE_REGISTRY
#if CH_CFG_USE_REGISTRY
Thread *r_newer;
Thread *r_older;
#endif
/* End of the fields shared with the Thread structure.*/
#if CH_TIME_QUANTUM > 0
#if CH_CFG_TIME_QUANTUM > 0
cnt_t r_preempt;
#endif
} ReadyList;

View File

@ -57,7 +57,7 @@
* kernel files should be loaded in the first 64K. Note that this is not
* a problem because upper addresses can be used by the user code, the
* kernel can context switch code running there.
* - The configuration option @p CH_OPTIMIZE_SPEED is not currently supported
* - The configuration option @p CH_CFG_OPTIMIZE_SPEED is not currently supported
* because the missing support of the @p inline "C" keyword in the
* compiler.
* .

View File

@ -317,12 +317,12 @@ typedef struct {
ThreadsQueue r_queue;
tprio_t r_prio;
Thread *r_current;
#if CH_USE_REGISTRY
#if CH_CFG_USE_REGISTRY
Thread *r_newer;
Thread *r_older;
#endif
/* End of the fields shared with the Thread structure.*/
#if CH_TIME_QUANTUM > 0
#if CH_CFG_TIME_QUANTUM > 0
cnt_t r_preempt;
#endif
} ReadyList;

View File

@ -57,7 +57,7 @@
* kernel files should be loaded in the first 64K. Note that this is not
* a problem because upper addresses can be used by the user code, the
* kernel can context switch code running there.
* - The configuration option @p CH_OPTIMIZE_SPEED is not currently supported
* - The configuration option @p CH_CFG_OPTIMIZE_SPEED is not currently supported
* because the missing support of the @p inline "C" keyword in the
* compiler.
* .

View File

@ -169,17 +169,17 @@ struct intctx {};
*/
#define PORT_OPTIMIZED_ISPREEMPTIONREQUIRED
#if (CH_TIME_QUANTUM > 0) || defined(__DOXYGEN__)
#if (CH_CFG_TIME_QUANTUM > 0) || defined(__DOXYGEN__)
/**
* @brief Inline-able version of this kernel function.
*/
#define chSchIsPreemptionRequired() \
(currp->p_preempt ? firstprio(&rlist.r_queue) > currp->p_prio : \
firstprio(&rlist.r_queue) >= currp->p_prio)
#else /* CH_TIME_QUANTUM == 0 */
#else /* CH_CFG_TIME_QUANTUM == 0 */
#define chSchIsPreemptionRequired() \
(firstprio(&rlist.r_queue) > currp->p_prio)
#endif /* CH_TIME_QUANTUM == 0 */
#endif /* CH_CFG_TIME_QUANTUM == 0 */
#endif /* _FROM_ASM_ */

View File

@ -315,12 +315,12 @@ typedef struct {
ThreadsQueue r_queue;
tprio_t r_prio;
Thread *r_current;
#if CH_USE_REGISTRY
#if CH_CFG_USE_REGISTRY
Thread *r_newer;
Thread *r_older;
#endif
/* End of the fields shared with the Thread structure.*/
#if CH_TIME_QUANTUM > 0
#if CH_CFG_TIME_QUANTUM > 0
cnt_t r_preempt;
#endif
} ReadyList;

View File

@ -57,7 +57,7 @@
* kernel files should be loaded in the first 64K. Note that this is not
* a problem because upper addresses can be used by the user code, the
* kernel can context switch code running there.
* - The configuration option @p CH_OPTIMIZE_SPEED is not currently supported
* - The configuration option @p CH_CFG_OPTIMIZE_SPEED is not currently supported
* because the missing support of the @p inline "C" keyword in the
* compiler.
* .