> -----Original Message-----
> From: Richard Cochran <richardcoch...@gmail.com>
> Sent: Monday, November 15, 2021 5:40 AM
> To: Keller, Jacob E <jacob.e.kel...@intel.com>
> Cc: linuxptp-devel@lists.sourceforge.net
> Subject: Re: [Linuxptp-devel] [PATCH v2 1/2] phc2sys: move read_phc into
> clock_adj.c
>
> On Fri, Oct 22, 2021 at 03:03:58PM -0700, Jacob Keller wrote:
> > Notice that read_phc returned 0 on failure and 1 on success. This is
> > fairly non-standard, so lets update clockadj_compare to return 0 on
> > success and -1 on failure. Fix the call sites to check correctly and
> > report an error.
>
> +1
>
> > +/**
> > + * Compare offset between two clocks
> > + * @param clkid A clock ID obtained using phc_open() or CLOCK_REALTIME
> > + * @param sysclk A clock ID obtained using phc_open() or CLOCK_REALTIME
> > + * @readings Number of readings to try
> > + * @offset On return, the nanoseconds offset between the clocks
> > + * @ts On return, the time of sysclk in nanoseconds that was used
> > + * @delay On return, the interval between two reads of sysclk
>
> Nit: please add the @return doxygen marker.
Sure thing. Will send a v3.
Thanks,
Jake
>
> > + *
> > + * Compare the offset between two clocks in a similar manner as the
> > + * PTP_SYS_OFFSET ioctls. Returns the difference between sysclk and clkid
> > by
> > + * performing multiple reads of sysclk with a read of clkid between.
> > + */
> > +int clockadj_compare(clockid_t clkid, clockid_t sysclk, int readings,
> > + int64_t *offset, uint64_t *ts, int64_t *delay);
>
> Thanks,
> Richard
_______________________________________________
Linuxptp-devel mailing list
Linuxptp-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxptp-devel