From 02766d82eb0b1870bb157b2d0eef4c26241e9fda Mon Sep 17 00:00:00 2001 From: "Justin C. Miller" Date: Mon, 18 Jan 2021 18:19:18 -0800 Subject: [PATCH] [kernel] Fix clock::spinwait spinwait wasn't scaling the target to microseconds --- src/kernel/clock.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/kernel/clock.cpp b/src/kernel/clock.cpp index 9196fa8..44e1976 100644 --- a/src/kernel/clock.cpp +++ b/src/kernel/clock.cpp @@ -16,7 +16,7 @@ clock::clock(uint64_t rate, clock::source source_func, void *data) : void clock::spinwait(uint64_t us) const { - uint64_t when = m_source(m_data) + us; + uint64_t when = value() + us; while (value() < when); }