aboutsummaryrefslogtreecommitdiff
path: root/kernel/drivers/timer.c
diff options
context:
space:
mode:
authorMarvin Borner2020-10-26 16:36:40 +0100
committerMarvin Borner2020-10-26 16:36:40 +0100
commit197ea3ca20879b29fca41a07cf43e5b04b9c5083 (patch)
treec0e0223e289bde3af7cca995f98d681779bfda26 /kernel/drivers/timer.c
parent4ae48304b2290b6c835eb3d937bd5e905ce0e5d4 (diff)
Optimizations
Diffstat (limited to 'kernel/drivers/timer.c')
-rw-r--r--kernel/drivers/timer.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/kernel/drivers/timer.c b/kernel/drivers/timer.c
index 812bde7..3bc1811 100644
--- a/kernel/drivers/timer.c
+++ b/kernel/drivers/timer.c
@@ -31,9 +31,7 @@ void timer_handler()
// "Delay" function with CPU sleep
void timer_wait(u32 ticks)
{
- u32 eticks;
-
- eticks = timer_ticks + ticks;
+ u32 eticks = timer_ticks + ticks;
while (timer_ticks < eticks) {
__asm__ volatile("sti//hlt//cli");
}