make loop counter volatile to prevent gcc4.1 from optimizing away entire loop body
authorGodmar Back <godmar@gmail.com>
Fri, 10 Nov 2006 02:20:08 +0000 (02:20 +0000)
committerGodmar Back <godmar@gmail.com>
Fri, 10 Nov 2006 02:20:08 +0000 (02:20 +0000)
src/devices/timer.c

index c8c41d55cf412948eb71a04b52c748f0c554465d..070c487328a61e10a8e6a86390703f4dd289173b 100644 (file)
@@ -162,7 +162,7 @@ too_many_loops (unsigned loops)
    differently in different places the results would be difficult
    to predict. */
 static void NO_INLINE
-busy_wait (int64_t loops) 
+busy_wait (volatile int64_t loops) 
 {
   while (loops-- > 0)
     continue;