Re: [Xen-devel] [PATCH v4 6/7] add mspin_sleep function to time manager
On Tue, Apr 10, 2018 at 09:17:00PM +0200, Paul Semel wrote: > this function uses mspin_sleep to spin sleep for t milliseconds > > Signed-off-by: Paul Semel> --- > > 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); Newline. And IMO can be squashed into the previous patch. Thanks, Roger. ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel
[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--- 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) * 10ul) +#define MSEC_TO_NSEC(x) ((x) * 100ul) /* Time from boot in nanoseconds */ -- 2.16.1 ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel