From 121ddd3843c9a283e25a016eddbbe5e60e063f8c Mon Sep 17 00:00:00 2001 From: "R. Steve McKown" Date: Tue, 31 Aug 2010 20:36:44 -0600 Subject: [PATCH] Volatile keyword tricks GCC into not optimizing out busy wait loop. --- tos/platforms/tmicore/MoteClockP.nc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tos/platforms/tmicore/MoteClockP.nc b/tos/platforms/tmicore/MoteClockP.nc index ca169f27..a9a97684 100644 --- a/tos/platforms/tmicore/MoteClockP.nc +++ b/tos/platforms/tmicore/MoteClockP.nc @@ -41,7 +41,7 @@ module MoteClockP { implementation { command error_t Init.init() { - uint16_t i; + volatile uint16_t i; #if defined (CALDCO_8MHZ_) && !defined(__DisableCalData) if (CALBC1_8MHZ != 0xff || CALDCO_8MHZ != 0xff) { -- 2.39.2