aboutsummaryrefslogtreecommitdiffstats
path: root/os/common
diff options
context:
space:
mode:
authorAndrew Wygle <awygle@gmail.com>2016-05-22 12:41:42 -0700
committerAndrew Wygle <awygle@gmail.com>2016-06-05 13:51:10 -0700
commit456702ee87b1adbbb559778aafe98c349700178a (patch)
treed68bd2207a0cb7ccb2af0db58e7f33c2df168e3b /os/common
parent5d20ce4595a564c1f98a31445f5015de41e1e25f (diff)
downloadChibiOS-Contrib-456702ee87b1adbbb559778aafe98c349700178a.tar.gz
ChibiOS-Contrib-456702ee87b1adbbb559778aafe98c349700178a.tar.bz2
ChibiOS-Contrib-456702ee87b1adbbb559778aafe98c349700178a.zip
Cleaned up MSP430X port to match recent changes to ChibiOS mainline.
Also fixed a couple of bugs identified as part of the refresh.
Diffstat (limited to 'os/common')
-rw-r--r--os/common/ports/MSP430X/chcore.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/os/common/ports/MSP430X/chcore.h b/os/common/ports/MSP430X/chcore.h
index 09f87c4..3683c1d 100644
--- a/os/common/ports/MSP430X/chcore.h
+++ b/os/common/ports/MSP430X/chcore.h
@@ -232,14 +232,19 @@ struct port_context {
* @details This macro must be inserted at the end of all IRQ handlers
* enabled to invoke system APIs.
*/
-#define PORT_IRQ_EPILOGUE() chSchRescheduleS()
+#define PORT_IRQ_EPILOGUE() { \
+ _dbg_check_lock(); \
+ if (chSchIsPreemptionRequired()) \
+ chSchDoReschedule(); \
+ _dbg_check_unlock(); \
+}
/**
* @brief IRQ handler function declaration.
* @note @p id can be a function name or a vector number depending on the
* port implementation.
*/
-#define PORT_IRQ_HANDLER(id) __attribute__ ((interrupt(id))) \
+#define PORT_IRQ_HANDLER(id) __attribute__ ((interrupt(id))) \
void ISR_ ## id (void)
/**