projects
/
pintos-anon
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
42af854
)
make loop counter volatile to prevent gcc4.1 from optimizing away entire loop body
author
Godmar Back
<godmar@gmail.com>
Fri, 10 Nov 2006 02:20:08 +0000
(
02:20
+0000)
committer
Godmar Back
<godmar@gmail.com>
Fri, 10 Nov 2006 02:20:08 +0000
(
02:20
+0000)
src/devices/timer.c
patch
|
blob
|
history
diff --git
a/src/devices/timer.c
b/src/devices/timer.c
index c8c41d55cf412948eb71a04b52c748f0c554465d..070c487328a61e10a8e6a86390703f4dd289173b 100644
(file)
--- a/
src/devices/timer.c
+++ b/
src/devices/timer.c
@@
-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;