From 7bee68de4d419b61f51833b0be08a534eb5dd884 Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Wed, 6 Oct 2004 18:27:00 +0000 Subject: [PATCH] timer_sleep() need interrupts on. --- src/devices/timer.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/devices/timer.c b/src/devices/timer.c index ec97783..ecf6c5a 100644 --- a/src/devices/timer.c +++ b/src/devices/timer.c @@ -66,9 +66,9 @@ timer_sleep (int64_t ticks) { int64_t start = timer_ticks (); + ASSERT (intr_get_level () == INTR_ON); while (timer_elapsed (start) < ticks) - if (intr_get_level () == INTR_ON) - thread_yield (); + thread_yield (); } /* Returns MS milliseconds in timer ticks, rounding up. */ -- 2.30.2