diff options
author | phk <phk@FreeBSD.org> | 2000-09-10 09:13:34 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2000-09-10 09:13:34 +0000 |
commit | 06ca4c9ec0ae64896cd4d42f586cdf3fa0c033ef (patch) | |
tree | 00d63cb860c29c9f9af90c109f9fb1e33ecb5874 /sys/kern/kern_ntptime.c | |
parent | 1b8c4626340843a0b47968e82226f92304210d55 (diff) | |
download | FreeBSD-src-06ca4c9ec0ae64896cd4d42f586cdf3fa0c033ef.zip FreeBSD-src-06ca4c9ec0ae64896cd4d42f586cdf3fa0c033ef.tar.gz |
Updates to the ntp pll from John Hay.
Submitted by: jhay
Diffstat (limited to 'sys/kern/kern_ntptime.c')
-rw-r--r-- | sys/kern/kern_ntptime.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/kern/kern_ntptime.c b/sys/kern/kern_ntptime.c index e95cc4b..323c97b 100644 --- a/sys/kern/kern_ntptime.c +++ b/sys/kern/kern_ntptime.c @@ -149,7 +149,6 @@ static long time_tick; /* nanoseconds per tick (ns) */ static l_fp time_offset; /* time offset (ns) */ static l_fp time_freq; /* frequency offset (ns/s) */ static l_fp time_adj; /* tick adjust (ns/s) */ -static l_fp time_phase; /* time phase (ns) */ #ifdef PPS_SYNC /* @@ -168,7 +167,6 @@ static l_fp time_phase; /* time phase (ns) */ static struct timespec pps_tf[3]; /* phase median filter */ static l_fp pps_freq; /* scaled frequency offset (ns/s) */ -static long pps_lastfreq; /* last scaled freq offset (ns/s) */ static long pps_fcount; /* frequency accumulator */ static long pps_jitter; /* nominal jitter (ns) */ static long pps_stabil; /* nominal stability (scaled ns/s) */ @@ -212,6 +210,7 @@ ntp_sysctl(SYSCTL_HANDLER_ARGS) ntv.maxerror = time_maxerror; ntv.esterror = time_esterror; ntv.tai = time_tai; + ntv.time_state = time_state; /* * Status word error decode. If any of these conditions occur, @@ -253,6 +252,7 @@ SYSCTL_PROC(_kern_ntp_pll, OID_AUTO, gettime, CTLTYPE_OPAQUE|CTLFLAG_RD, #ifdef PPS_SYNC SYSCTL_INT(_kern_ntp_pll, OID_AUTO, pps_shiftmax, CTLFLAG_RW, &pps_shiftmax, 0, ""); SYSCTL_INT(_kern_ntp_pll, OID_AUTO, pps_shift, CTLFLAG_RW, &pps_shift, 0, ""); +SYSCTL_INT(_kern_ntp_pll, OID_AUTO, time_monitor, CTLFLAG_RD, &time_monitor, 0, ""); SYSCTL_OPAQUE(_kern_ntp_pll, OID_AUTO, pps_freq, CTLFLAG_RD, &pps_freq, sizeof(pps_freq), "I", ""); SYSCTL_OPAQUE(_kern_ntp_pll, OID_AUTO, time_freq, CTLFLAG_RD, &time_freq, sizeof(time_freq), "I", ""); @@ -504,7 +504,7 @@ ntp_update_second(struct timecounter *tcp) #ifdef PPS_SYNC /* XXX even if PPS signal dies we should finish adjustment ? */ if (time_status & STA_PPSTIME && time_status & - STA_PPSSIGNAL) + STA_PPSSIGNAL) L_RSHIFT(ftemp, pps_shift); else L_RSHIFT(ftemp, SHIFT_PLL + time_constant); @@ -740,7 +740,7 @@ hardpps(tsp, nsec) if (pps_tf[1].tv_nsec < pps_tf[2].tv_nsec) { v_nsec = pps_tf[1].tv_nsec; /* 2 1 0 */ u_nsec = pps_tf[2].tv_nsec - pps_tf[0].tv_nsec; - } else if (pps_tf[2].tv_nsec < pps_tf[0].tv_nsec) { + } else if (pps_tf[2].tv_nsec < pps_tf[0].tv_nsec) { v_nsec = pps_tf[0].tv_nsec; /* 1 0 2 */ u_nsec = pps_tf[1].tv_nsec - pps_tf[2].tv_nsec; } else { @@ -750,7 +750,7 @@ hardpps(tsp, nsec) } /* - * Nominal jitter is due to PPS signal noise and interrupt + * Nominal jitter is due to PPS signal noise and interrupt * latency. If it exceeds the popcorn threshold, the sample is * discarded. otherwise, if so enabled, the time offset is * updated. We can tolerate a modest loss of data here without |