]> oss.titaniummirror.com Git - tinyos-2.x.git/blobdiff - tos/chips/atm128/atm128hardware.h
Remove bogus 'tab:4' and 'tab:2' markers.
[tinyos-2.x.git] / tos / chips / atm128 / atm128hardware.h
index f1b26a0e93f6f776c23539b92bdfc00051618915..9cc0e93797df5dc1c5a93ce1e586073ef7b39205 100644 (file)
@@ -1,6 +1,6 @@
 //  $Id$
 
-/*                                                                     tab:4
+/*                                                                     
  *  IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.  By
  *  downloading, copying, installing or using the software you agree to
  *  this license.  If you do not agree to this license, do not download,
@@ -104,6 +104,7 @@ __nesc_atomic_start(void) @spontaneous()
 {
     __nesc_atomic_t result = SREG;
     __nesc_disable_interrupt();
+    asm volatile("" : : : "memory"); /* ensure atomic section effect visibility */
     return result;
 }
 
@@ -111,6 +112,7 @@ __nesc_atomic_start(void) @spontaneous()
 inline void 
 __nesc_atomic_end(__nesc_atomic_t original_SREG) @spontaneous()
 {
+  asm volatile("" : : : "memory"); /* ensure atomic section effect visibility */
   SREG = original_SREG;
 }
 #endif
@@ -133,4 +135,6 @@ mcu_power_t mcombine(mcu_power_t m1, mcu_power_t m2) {
   return (m1 < m2)? m1: m2;
 }
 
-#endif //_H_atmega128hardware_H
\ No newline at end of file
+#endif //_H_atmega128hardware_H
+
+