Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/kern Remember if ntp has adjusted clock rate, hardware R...



details:   https://anonhg.NetBSD.org/src/rev/d0205c2484dc
branches:  trunk
changeset: 545825:d0205c2484dc
user:      dsl <dsl%NetBSD.org@localhost>
date:      Wed Apr 16 21:35:07 2003 +0000

description:
Remember if ntp has adjusted clock rate, hardware RTC may be wrong.

diffstat:

 sys/kern/kern_ntptime.c |  8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diffs (36 lines):

diff -r e78660787ed8 -r d0205c2484dc sys/kern/kern_ntptime.c
--- a/sys/kern/kern_ntptime.c   Wed Apr 16 21:34:15 2003 +0000
+++ b/sys/kern/kern_ntptime.c   Wed Apr 16 21:35:07 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: kern_ntptime.c,v 1.22 2003/01/18 10:06:28 thorpej Exp $        */
+/*     $NetBSD: kern_ntptime.c,v 1.23 2003/04/16 21:35:07 dsl Exp $    */
 
 /******************************************************************************
  *                                                                            *
@@ -50,7 +50,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_ntptime.c,v 1.22 2003/01/18 10:06:28 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_ntptime.c,v 1.23 2003/04/16 21:35:07 dsl Exp $");
 
 #include "opt_ntp.h"
 
@@ -83,6 +83,7 @@
 extern long time_constant;     /* pll time constant */
 extern long time_precision;    /* clock precision (us) */
 extern long time_tolerance;    /* frequency tolerance (scaled ppm) */
+extern int time_adjusted;      /* ntp might have changes the system time */
 
 #ifdef PPS_SYNC
 /*
@@ -231,6 +232,9 @@
         * what it is doing.
         */
        modes = ntv->modes;
+       if (modes != 0)
+               /* We need to save the system time during shutdown */
+               time_adjusted |= 2;
        s = splclock();
        if (modes & MOD_FREQUENCY)
 #ifdef PPS_SYNC



Home | Main Index | Thread Index | Old Index