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

[Xen-devel] [PATCH 6/7] add mspin_sleep function to time manager



From: Paul Semel <phentex@xxxxxxxxx>

Signed-off-by: Paul Semel <phentex@xxxxxxxxx>

cr https://code.amazon.com/reviews/CR-786227
---
 common/time.c | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/common/time.c b/common/time.c
index 6aa1648..7577694 100644
--- a/common/time.c
+++ b/common/time.c
@@ -138,6 +138,20 @@ static inline void spin_sleep(uint64_t t)
     nspin_sleep(nsec);
 }
 
+#if defined(__i386__)
+static inline void mspin_sleep(uint32_t t)
+#else
+static inline void mspin_sleep(uint64_t t)
+#endif
+{
+#if defined(__i386__)
+    uint32_t nsec = t * 1000000;
+#else
+    uint64_t nsec = t * 1000000ul;
+#endif
+    nspin_sleep(nsec);
+}
+
 /*
  * Local variables:
  * mode: C
-- 
2.16.2

Amazon Development Center Germany GmbH
Berlin - Dresden - Aachen
main office: Krausenstr. 38, 10117 Berlin
Geschaeftsfuehrer: Dr. Ralf Herbrich, Christian Schlaeger
Ust-ID: DE289237879
Eingetragen am Amtsgericht Charlottenburg HRB 149173 B


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

 


Rackspace

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