[PATCH 03/10] dovetail/clock: implement pipeline_get_host_time

Philippe Gerum rpm at xenomai.org
Mon Jan 11 18:26:57 CET 2021


hongzha1 via Xenomai <xenomai at xenomai.org> writes:

> Signed-off-by: hongzha1 <hongzhan.chen at intel.com>
> ---
>  include/cobalt/kernel/dovetail/pipeline/clock.h | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/include/cobalt/kernel/dovetail/pipeline/clock.h b/include/cobalt/kernel/dovetail/pipeline/clock.h
> index 5176b1506..28d89b44b 100644
> --- a/include/cobalt/kernel/dovetail/pipeline/clock.h
> +++ b/include/cobalt/kernel/dovetail/pipeline/clock.h
> @@ -7,6 +7,7 @@
>  
>  #include <cobalt/uapi/kernel/types.h>
>  #include <cobalt/kernel/assert.h>
> +#include <linux/ktime.h>
>  
>  struct timespec64;
>  
> @@ -50,7 +51,7 @@ static inline const char *pipeline_clock_name(void)
>  static inline int pipeline_get_host_time(struct timespec64 *tp)
>  {
>  	/* Convert ktime_get_real_fast_ns() to timespec. */
> -	TODO();
> +	*tp = ktime_to_timespec64(ktime_get_real_fast_ns());
>  
>  	return 0;
>  }

Yummie. Ack, picking up this patch. Thanks.

-- 
Philippe.



More information about the Xenomai mailing list