Various cleanups: threads, STA_NANO

Eric S. Raymond esr at thyrsus.com
Wed Jan 23 05:43:53 UTC 2019


Matthew Selsky via devel <devel at ntpsec.org>:
> We added the STA_NANO checks to support systems that have some STA_
> symbols, but not all.  See
> https://lists.ntpsec.org/pipermail/vc/2017-December/003604.html

In particular, some of our targets (some BSDs, I don't remember which)
have only microsecond, not nanosecond resolution in the clock-adjustment calls.

> We'd have to survey the platforms that we care about to see if they
> have these symbols now.

No, actually, we *don't* need to make that effort.  I've already solved
this problem.

It was some work getting the code to work at both scales, but I did it
and confined the differences to small sections conditionalized by
STA_NANO.  The moment one of those oddball platforms ups its
resolution it will also set STA_NANO, then all our stuff will Just Work
on the next compile.

Since this is a user-visible API break, it ain't going to happen on a
minor OS point release and is unlikely to happen at all without loud
public warnings.  I know it sounds odd to say this, but this is really
not our problem; it's up to the BSD Ports people (the analog of Linux
distro integrators) to do the right thing downstream of us.
 
> https://docs.ntpsec.org/latest/#platforms doesn't give many specifics on what platforms we support.

That's because our actual support target is this:

    This software should build on any operating system conformant to
    POSIX.1-2001 and ISO/IEC 9899:1999 (C99).  In addition, the operating
    system must have an ntp_adjtime(2) call. Also, it must support the
    IPv6 API defined in RFC 2493 and RFC 2553. Finally, it must support
    iterating over active UDP interfaces via getifaddrs(3) or some
    equivalent facility.

There is some point in listing known-good platforms (Linux is the
biggie), but no point in trying to be exhaustive about it, because
anybody with enough chops to build this on a Unix variant we don't
know about is necessarily clued in enough to apply this creterion
themselves.
-- 
		<a href="http://www.catb.org/~esr/">Eric S. Raymond</a>

My work is funded by the Internet Civil Engineering Institute: https://icei.org
Please visit their site and donate: the civilization you save might be your own.




More information about the devel mailing list