|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH v3 6/7] add mspin_sleep function to time manager
From: Paul Semel <phentex@xxxxxxxxx>
this function uses mspin_sleep to spin sleep for t milliseconds
Signed-off-by: Paul Semel <phentex@xxxxxxxxx>
---
common/time.c | 6 ++++++
include/xtf/time.h | 1 +
2 files changed, 7 insertions(+)
diff --git a/common/time.c b/common/time.c
index e744ab1..9685591 100644
--- a/common/time.c
+++ b/common/time.c
@@ -157,6 +157,12 @@ static inline void spin_sleep(uint64_t t)
nspin_sleep(nsec);
}
+static inline void mspin_sleep(uint64_t t)
+{
+ uint64_t nsec = MSEC_TO_NSEC(t);
+ nspin_sleep(nsec);
+}
+
/*
* Local variables:
* mode: C
diff --git a/include/xtf/time.h b/include/xtf/time.h
index 5ed88ad..17fb561 100644
--- a/include/xtf/time.h
+++ b/include/xtf/time.h
@@ -20,6 +20,7 @@ struct timeval {
}
#define SEC_TO_NSEC(x) ((x) * 1000000000ul)
+#define MSEC_TO_NSEC(x) ((x) * 1000000ul)
/* Time from boot in nanoseconds */
--
2.16.1
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |