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

Re: [Xen-devel] [PATCH v4 7/7] add sleep, msleep and NOW() macros to time manager



On Tue, Apr 10, 2018 at 09:17:01PM +0200, Paul Semel wrote:
> those are helpful macro to use the time manager correctly
> 
> Signed-off-by: Paul Semel <phentex@xxxxxxxxx>
> ---
> 
> Notes:
>     v4:
>     - new patch version
> 
>  common/time.c      | 10 ++++++++++
>  include/xtf/time.h | 12 ++++++++++++
>  2 files changed, 22 insertions(+)
> 
> diff --git a/common/time.c b/common/time.c
> index 7515eb0..e2779b9 100644
> --- a/common/time.c
> +++ b/common/time.c
> @@ -163,6 +163,16 @@ static inline void mspin_sleep(uint64_t t)
>      nspin_sleep(nsec);
>  }
>  
> +void sleep(uint64_t t)
> +{
> +    spin_sleep(t);
> +}
> +
> +void msleep(uint64_t t)
> +{
> +    mspin_sleep(t);

Why can you just call mspin_sleep msleep directly?

The same applies to spin_sleep.

Also I was expecting to see some kind of test appear at the end of the
series. You are basically adding a bunch of dead code, since there's
no user of any of the newly introduced functions.

Thanks, Roger.

_______________________________________________
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®.