|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Minios-devel] [UNIKRAFT PATCHv5 45/46] plat/kvm: Implement time_block_until for arm64
From: Wei Chen <Wei.Chen@xxxxxxx>
As we haven't implement full functions for timer for arm64.
But this function is needed by Unikraft. So we impplement
a temporary function to make compiler happy.
Signed-off-by: Wei Chen <Wei.Chen@xxxxxxx>
---
plat/common/arm/time.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/plat/common/arm/time.c b/plat/common/arm/time.c
index 1829938..7deb745 100644
--- a/plat/common/arm/time.c
+++ b/plat/common/arm/time.c
@@ -33,6 +33,7 @@
*/
#include <uk/assert.h>
#include <uk/plat/time.h>
+#include <uk/arch/atomic.h>
#include <cpu.h>
static uint64_t boot_ticks;
@@ -136,6 +137,16 @@ static int generic_timer_init(void)
return 0;
}
+long sched_have_pending_events;
+
+void time_block_until(__snsec until)
+{
+ while ((__snsec) ukplat_monotonic_clock() < until) {
+ if (ukarch_test_and_clr_bit(0, &sched_have_pending_events))
+ break;
+ }
+}
+
struct ukplat_time_ops arch_timer_ops = {
.init = generic_timer_init,
.monotonic = generic_timer_monotonic,
--
2.17.1
_______________________________________________
Minios-devel mailing list
Minios-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/minios-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |