summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--util.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/util.c b/util.c
index bccd41d..1444dd6 100644
--- a/util.c
+++ b/util.c
@@ -26,14 +26,14 @@ ndelay(unsigned long nsec)
{
unsigned long target, now;
+ /* ??? Fix race between setting an alarm and waiting for an interrupt,
+ so that we can use wtint here. This isn't used much except for
+ during startup, so it probably doesn't matter much. */
+
now = get_wall_time();
target = now + nsec;
- set_alarm_abs(nsec);
do
- {
- wtint(0);
- now = get_wall_time();
- }
+ now = get_wall_time();
while (now < target);
}