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. > + * > + * 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