summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
Diffstat (limited to 'sys')
-rw-r--r--sys/amd64/isa/clock.c1
-rw-r--r--sys/i386/isa/clock.c1
-rw-r--r--sys/isa/atrtc.c1
3 files changed, 3 insertions, 0 deletions
diff --git a/sys/amd64/isa/clock.c b/sys/amd64/isa/clock.c
index 2809828..3275267 100644
--- a/sys/amd64/isa/clock.c
+++ b/sys/amd64/isa/clock.c
@@ -286,6 +286,7 @@ DELAY(int n)
start = rdtsc();
end = start + (tsc_freq * n) / 1000000;
do {
+ cpu_spinwait();
now = rdtsc();
} while (now < end || (now > start && end < start));
sched_unpin();
diff --git a/sys/i386/isa/clock.c b/sys/i386/isa/clock.c
index a67db31..f31c7ea 100644
--- a/sys/i386/isa/clock.c
+++ b/sys/i386/isa/clock.c
@@ -291,6 +291,7 @@ DELAY(int n)
start = rdtsc();
end = start + (tsc_freq * n) / 1000000;
do {
+ cpu_spinwait();
now = rdtsc();
} while (now < end || (now > start && end < start));
sched_unpin();
diff --git a/sys/isa/atrtc.c b/sys/isa/atrtc.c
index a67db31..f31c7ea 100644
--- a/sys/isa/atrtc.c
+++ b/sys/isa/atrtc.c
@@ -291,6 +291,7 @@ DELAY(int n)
start = rdtsc();
end = start + (tsc_freq * n) / 1000000;
do {
+ cpu_spinwait();
now = rdtsc();
} while (now < end || (now > start && end < start));
sched_unpin();
OpenPOWER on IntegriCloud