summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Henderson <rth@twiddle.net>2011-05-06 18:05:46 -0700
committerRichard Henderson <rth@twiddle.net>2011-05-06 18:05:46 -0700
commita7b2ef5dd9bb9890f10252981481b55ae30babd1 (patch)
tree709164ae779b78dc52876ed86477b56736e884ac
parent2d46a7ec8fdf0c22f21e57ecfc46a5df5cd5cfbf (diff)
downloadqemu-palcode-a7b2ef5dd9bb9890f10252981481b55ae30babd1.tar.gz
Don't use alarms for ndelay.
-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);
}