aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--os/ports/GCC/AVR/chcore.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/os/ports/GCC/AVR/chcore.h b/os/ports/GCC/AVR/chcore.h
index 047fd1a9d..a974b5a1a 100644
--- a/os/ports/GCC/AVR/chcore.h
+++ b/os/ports/GCC/AVR/chcore.h
@@ -235,7 +235,7 @@ struct context {
* actions.
* @note Implemented as global interrupt disable.
*/
-#define port_lock() asm volatile ("cli")
+#define port_lock() asm volatile ("cli" : : : "memory")
/**
* @brief Kernel-unlock action.
@@ -243,7 +243,7 @@ struct context {
* actions.
* @note Implemented as global interrupt enable.
*/
-#define port_unlock() asm volatile ("sei")
+#define port_unlock() asm volatile ("sei" : : : "memory")
/**
* @brief Kernel-lock action from an interrupt handler.
@@ -268,7 +268,7 @@ struct context {
* @note Of course non maskable interrupt sources are not included.
* @note Implemented as global interrupt disable.
*/
-#define port_disable() asm volatile ("cli")
+#define port_disable() asm volatile ("cli" : : : "memory")
/**
* @brief Disables the interrupt sources below kernel-level priority.
@@ -276,13 +276,13 @@ struct context {
* @note Same as @p port_disable() in this port, there is no difference
* between the two states.
*/
-#define port_suspend() asm volatile ("cli")
+#define port_suspend() asm volatile ("cli" : : : "memory")
/**
* @brief Enables all the interrupt sources.
* @note Implemented as global interrupt enable.
*/
-#define port_enable() asm volatile ("sei")
+#define port_enable() asm volatile ("sei" : : : "memory")
/**
* @brief Enters an architecture-dependent IRQ-waiting mode.
@@ -294,8 +294,8 @@ struct context {
* reasons.
*/
#if ENABLE_WFI_IDLE != 0
-#define port_wait_for_interrupt() { \
- asm volatile ("sleep"); \
+#define port_wait_for_interrupt() { \
+ asm volatile ("sleep" : : : "memory"); \
}
#else
#define port_wait_for_interrupt()