]> oss.titaniummirror.com Git - tinyos-2.x.git/blobdiff - tos/chips/msp430/McuSleepC.nc
Remove need for volatiles in scheduler by fixing McuSleep.sleep to tell
[tinyos-2.x.git] / tos / chips / msp430 / McuSleepC.nc
index 64c87a7e2ec226cb4133dcb704dac82257c08b35..504e9add33adeaf1a387e331cabab971eb2d9079 100644 (file)
@@ -38,7 +38,7 @@
  *
  */
 
-module McuSleepC {
+module McuSleepC @safe() {
   provides {
     interface McuSleep;
     interface McuPowerState;
@@ -114,6 +114,8 @@ implementation {
     }
     temp = msp430PowerBits[powerState] | SR_GIE;
     __asm__ __volatile__( "bis  %0, r2" : : "m" (temp) );
+    // All of memory may change at this point...
+    asm volatile ("" : : : "memory");
     __nesc_disable_interrupt();
   }