[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH v4 6/7] add mspin_sleep function to time manager
this function uses mspin_sleep to spin sleep for t milliseconds Signed-off-by: Paul Semel <phentex@xxxxxxxxx> --- Notes: v4: - new patch version 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 87db124..7515eb0 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 ce4d6db..d9cecdb 100644 --- a/include/xtf/time.h +++ b/include/xtf/time.h @@ -15,6 +15,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 |