aboutsummaryrefslogtreecommitdiffstats
path: root/os/rt/ports
diff options
context:
space:
mode:
authorGiovanni Di Sirio <gdisirio@gmail.com>2015-03-09 14:57:41 +0000
committerGiovanni Di Sirio <gdisirio@gmail.com>2015-03-09 14:57:41 +0000
commitb8dcd884ffaf6856108d2279905503bbd86c33cf (patch)
treea3bfc65df2e239ad342f7f32302cd59e108d06b2 /os/rt/ports
parenta9cbe386f2b49049771c3980d8954275d510cf2f (diff)
downloadChibiOS-b8dcd884ffaf6856108d2279905503bbd86c33cf.tar.gz
ChibiOS-b8dcd884ffaf6856108d2279905503bbd86c33cf.tar.bz2
ChibiOS-b8dcd884ffaf6856108d2279905503bbd86c33cf.zip
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@7744 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/rt/ports')
-rw-r--r--os/rt/ports/ARMCMx/chcore_v7m.c18
-rw-r--r--os/rt/ports/ARMCMx/chcore_v7m.h2
2 files changed, 12 insertions, 8 deletions
diff --git a/os/rt/ports/ARMCMx/chcore_v7m.c b/os/rt/ports/ARMCMx/chcore_v7m.c
index 577599834..82cbb1c32 100644
--- a/os/rt/ports/ARMCMx/chcore_v7m.c
+++ b/os/rt/ports/ARMCMx/chcore_v7m.c
@@ -51,14 +51,16 @@
/* Module interrupt handlers. */
/*===========================================================================*/
-#if !CORTEX_SIMPLIFIED_PRIORITY || defined(__DOXYGEN__)
+#if (CORTEX_SIMPLIFIED_PRIORITY == FALSE) || defined(__DOXYGEN__)
/**
* @brief SVC vector.
* @details The SVC vector is used for exception mode re-entering after a
* context switch.
* @note The PendSV vector is only used in advanced kernel mode.
*/
+/*lint -save -e9075 [8.4] All symbols are invoked from asm context.*/
void SVC_Handler(void) {
+/*lint -restore*/
struct port_extctx *ctxp;
#if CORTEX_USE_FPU
@@ -79,16 +81,18 @@ void SVC_Handler(void) {
/* Restoring the normal interrupts status.*/
port_unlock_from_isr();
}
-#endif /* !CORTEX_SIMPLIFIED_PRIORITY */
+#endif /* CORTEX_SIMPLIFIED_PRIORITY == FALSE */
-#if CORTEX_SIMPLIFIED_PRIORITY || defined(__DOXYGEN__)
+#if (CORTEX_SIMPLIFIED_PRIORITY == TRUE) || defined(__DOXYGEN__)
/**
* @brief PendSV vector.
* @details The PendSV vector is used for exception mode re-entering after a
* context switch.
* @note The PendSV vector is only used in compact kernel mode.
*/
+/*lint -save -e9075 [8.4] All symbols are invoked from asm context.*/
void PendSV_Handler(void) {
+/*lint -restore*/
struct port_extctx *ctxp;
#if CORTEX_USE_FPU
@@ -106,7 +110,7 @@ void PendSV_Handler(void) {
/* Writing back the modified PSP value.*/
__set_PSP((uint32_t)ctxp);
}
-#endif /* CORTEX_SIMPLIFIED_PRIORITY */
+#endif /* CORTEX_SIMPLIFIED_PRIORITY == TRUE */
/*===========================================================================*/
/* Module exported functions. */
@@ -118,10 +122,10 @@ void PendSV_Handler(void) {
void _port_irq_epilogue(void) {
port_lock_from_isr();
- if ((SCB->ICSR & SCB_ICSR_RETTOBASE_Msk) != 0) {
+ if ((SCB->ICSR & SCB_ICSR_RETTOBASE_Msk) != 0U) {
struct port_extctx *ctxp;
-#if CORTEX_USE_FPU
+#if CORTEX_USE_FPU == TRUE
/* Enforcing a lazy FPU state save by accessing the FPCSR register.*/
(void) __get_FPSCR();
#endif
@@ -135,7 +139,7 @@ void _port_irq_epilogue(void) {
/* Setting up a fake XPSR register value.*/
ctxp->xpsr = (regarm_t)0x01000000;
-#if CORTEX_USE_FPU
+#if CORTEX_USE_FPU == TRUE
ctxp->fpscr = (regarm_t)FPU->FPDSCR;
#endif
diff --git a/os/rt/ports/ARMCMx/chcore_v7m.h b/os/rt/ports/ARMCMx/chcore_v7m.h
index b4fafc736..f3c59a296 100644
--- a/os/rt/ports/ARMCMx/chcore_v7m.h
+++ b/os/rt/ports/ARMCMx/chcore_v7m.h
@@ -85,7 +85,7 @@
*/
#if !defined(CORTEX_USE_FPU)
#define CORTEX_USE_FPU CORTEX_HAS_FPU
-#elif CORTEX_USE_FPU && !CORTEX_HAS_FPU
+#elif (CORTEX_USE_FPU == TRUE) && (CORTEX_HAS_FPU == FALSE)
/* This setting requires an FPU presence check in case it is externally
redefined.*/
#error "the selected core does not have an FPU"