Source-Changes-HG archive

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

[src/trunk]: src/sys/kern Flag that adjtime has happened, hardware RTC might ...



details:   https://anonhg.NetBSD.org/src/rev/e78660787ed8
branches:  trunk
changeset: 545824:e78660787ed8
user:      dsl <dsl%NetBSD.org@localhost>
date:      Wed Apr 16 21:34:15 2003 +0000

description:
Flag that adjtime has happened, hardware RTC might be wrong

diffstat:

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

diffs (36 lines):

diff -r 45f0ad85b9ac -r e78660787ed8 sys/kern/kern_time.c
--- a/sys/kern/kern_time.c      Wed Apr 16 21:08:06 2003 +0000
+++ b/sys/kern/kern_time.c      Wed Apr 16 21:34:15 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: kern_time.c,v 1.67 2003/03/10 21:49:56 nathanw Exp $   */
+/*     $NetBSD: kern_time.c,v 1.68 2003/04/16 21:34:15 dsl Exp $       */
 
 /*-
  * Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -72,7 +72,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_time.c,v 1.67 2003/03/10 21:49:56 nathanw Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_time.c,v 1.68 2003/04/16 21:34:15 dsl Exp $");
 
 #include "fs_nfs.h"
 #include "opt_nfs.h"
@@ -413,6 +413,7 @@
 int    tickdelta;                      /* current clock skew, us. per tick */
 long   timedelta;                      /* unapplied time correction, us. */
 long   bigadj = 1000000;               /* use 10x skew above bigadj us. */
+int    time_adjusted;                  /* set if an adjustment is made */
 
 /* ARGSUSED */
 int
@@ -474,6 +475,9 @@
         */
        if (ndelta < 0)
                ntickdelta = -ntickdelta;
+       if (ndelta != 0)
+               /* We need to save the system clock time during shutdown */
+               time_adjusted |= 1;
        s = splclock();
        odelta = timedelta;
        timedelta = ndelta;



Home | Main Index | Thread Index | Old Index