More cruft ?? SIGSYS/ntp_adjtime, ifdef/STA_NANO

Hal Murray hmurray at megapathdsl.net
Tue Mar 17 16:46:40 UTC 2020


There is a pile of ugly code that starts on line 1069 of ntpd/ntp_loopfilter.c
#ifdef  SIGSYS
        /*
         * Use sigsetjmp() to save state and then call ntp_adjtime(); if
         * it fails, then pll_trap() will set pll_control false before
         * returning control using siglogjmp().
         */

Does anybody know what that is doing?  Or why we shouldn't remove it?  Do we 
run on any systems without ntp_adjtime()?

devel/hacking.adoc says:
  * Either ntp_adjtime() or the older BSD adjtime(2).

I'm guessing that it is leftover from the introduction of the slewing option 
into kernels so they didn't have to step the clock when making small 
adjustments.

---------

Do we run on any systems without STA_NANO?  If not, we can remove a layer of 
ifdef-s.

Again, I think that was added when kernels were transitioning from 
microseconds to nanoseconds.  (which means they were already using slewing.)

-- 
These are my opinions.  I hate spam.





More information about the devel mailing list