From 783b906895c12fa66a51bafdfeb223daeb8beeff Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Mon, 19 Jan 2009 22:32:57 -0800 Subject: [PATCH] Remove unnecessary optimization barrier. 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 for pointing this out. --- src/devices/timer.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/devices/timer.c b/src/devices/timer.c index c97667f..befaaae 100644 --- 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; } -- 2.30.2