[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Minios-devel] [UNIKRAFT/NEWLIB PATCH] time: Use new uk_sched_thread_sleep() function to implement msleep



This interface has been changed on Unikraft with the latest version.

Signed-off-by: Simon Kuenzer <simon.kuenzer@xxxxxxxxx>
---
 time.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/time.c b/time.c
index 3196ad8..086f4c5 100644
--- a/time.c
+++ b/time.c
@@ -40,9 +40,11 @@
 #include <uk/config.h>
 #if CONFIG_HAVE_SCHED
 #include <uk/sched.h>
+#include <uk/thread.h>
 #else
 #include <uk/plat/lcpu.h>
 #endif
+#include <uk/arch/time.h>
 
 int
 gettimeofday(struct timeval *tv __unused, void *tz __unused)
@@ -59,7 +61,7 @@ int utime(const char *filename __unused, const struct utimbuf 
*times __unused)
 static void msleep(uint32_t milliseconds)
 {
 #if CONFIG_HAVE_SCHED
-       uk_sched_sleep(milliseconds);
+       uk_sched_thread_sleep(ukarch_time_msec_to_nsec((__nsec) milliseconds));
 #else
        ukplat_lcpu_halt_to(milliseconds);
 #endif
-- 
2.7.4


_______________________________________________
Minios-devel mailing list
Minios-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/minios-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.