aboutsummaryrefslogtreecommitdiffstats
path: root/os/ports/GCC/PPC/chcore.h
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2010-08-31 18:46:59 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2010-08-31 18:46:59 +0000
commita14fa4358d81cff24dbf0dbc37046b8e1629b512 (patch)
treeba5a5d85dc2110e0a575234a5957e9cc955dfcba /os/ports/GCC/PPC/chcore.h
parentebe5a8020025e7d8747c07e77789a1797a349c99 (diff)
downloadChibiOS-a14fa4358d81cff24dbf0dbc37046b8e1629b512.tar.gz
ChibiOS-a14fa4358d81cff24dbf0dbc37046b8e1629b512.tar.bz2
ChibiOS-a14fa4358d81cff24dbf0dbc37046b8e1629b512.zip
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@2152 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/ports/GCC/PPC/chcore.h')
-rw-r--r--os/ports/GCC/PPC/chcore.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/os/ports/GCC/PPC/chcore.h b/os/ports/GCC/PPC/chcore.h
index 70f301c45..77056b6bd 100644
--- a/os/ports/GCC/PPC/chcore.h
+++ b/os/ports/GCC/PPC/chcore.h
@@ -263,12 +263,12 @@ struct context {
/**
* @details Implemented as global interrupt disable.
*/
-#define port_lock() asm ("wrteei 0")
+#define port_lock() asm volatile ("wrteei 0" : : : "memory")
/**
* @details Implemented as global interrupt enable.
*/
-#define port_unlock() asm ("wrteei 1")
+#define port_unlock() asm volatile("wrteei 1" : : : "memory")
/**
* @details Implemented as global interrupt disable.
@@ -283,18 +283,18 @@ struct context {
/**
* @details Implemented as global interrupt disable.
*/
-#define port_disable() asm ("wrteei 0")
+#define port_disable() asm volatile ("wrteei 0" : : : "memory")
/**
* @details Same as @p port_disable() in this port, there is no difference
* between the two states.
*/
-#define port_suspend() asm ("wrteei 0")
+#define port_suspend() asm volatile ("wrteei 0" : : : "memory")
/**
* @details Implemented as global interrupt enable.
*/
-#define port_enable() asm ("wrteei 1")
+#define port_enable() asm volatile ("wrteei 1" : : : "memory")
/**
* @details This port function is implemented as inlined code for performance
@@ -303,7 +303,7 @@ struct context {
#if ENABLE_WFI_IDLE != 0
#ifndef port_wait_for_interrupt
#define port_wait_for_interrupt() { \
- asm ("wait"); \
+ asm volatile ("wait" : : : "memory"); \
}
#endif
#else