projects
/
pintos-anon
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ffdf5a5
)
Remove unnecessary optimization barrier.
author
Ben Pfaff
<blp@cs.stanford.edu>
Tue, 20 Jan 2009 06:32:57 +0000
(22:32 -0800)
committer
Ben Pfaff
<blp@cs.stanford.edu>
Tue, 20 Jan 2009 06:32:57 +0000
(22:32 -0800)
The compiler can't optimize out the load of "ticks" here because
it can't look into intr_disable() and intr_set_level() and know that
they don't modify "ticks".
Thanks to Martin <mfleener@stanford.edu> for pointing this out.
src/devices/timer.c
patch
|
blob
|
history
diff --git
a/src/devices/timer.c
b/src/devices/timer.c
index c97667f56bfcd5d9bd70862c7ff3ca2047f8f706..befaaaed5a9a1ac0cd25ab76f8afd96fe6865127 100644
(file)
--- a/
src/devices/timer.c
+++ b/
src/devices/timer.c
@@
-73,7
+73,6
@@
timer_ticks (void)
enum intr_level old_level = intr_disable ();
int64_t t = ticks;
intr_set_level (old_level);
- barrier ();
return t;
}