Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/alpha/alpha Patch time_precision so we report a rea...



details:   https://anonhg.NetBSD.org/src/rev/025d0b8ec1a0
branches:  trunk
changeset: 476117:025d0b8ec1a0
user:      sommerfeld <sommerfeld%NetBSD.org@localhost>
date:      Mon Sep 06 21:54:17 1999 +0000

description:
Patch time_precision so we report a realistic NTP "precision" value to userland.

diffstat:

 sys/arch/alpha/alpha/clock.c |  16 ++++++++++++++--
 1 files changed, 14 insertions(+), 2 deletions(-)

diffs (51 lines):

diff -r b5bba86b8841 -r 025d0b8ec1a0 sys/arch/alpha/alpha/clock.c
--- a/sys/arch/alpha/alpha/clock.c      Mon Sep 06 21:50:47 1999 +0000
+++ b/sys/arch/alpha/alpha/clock.c      Mon Sep 06 21:54:17 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: clock.c,v 1.25 1999/03/04 06:46:43 chs Exp $ */
+/* $NetBSD: clock.c,v 1.26 1999/09/06 21:54:17 sommerfeld Exp $ */
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -44,7 +44,7 @@
 
 #include <sys/cdefs.h>                 /* RCS ID & Copyright macro defns */
 
-__KERNEL_RCSID(0, "$NetBSD: clock.c,v 1.25 1999/03/04 06:46:43 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: clock.c,v 1.26 1999/09/06 21:54:17 sommerfeld Exp $");
 
 #include <sys/param.h>
 #include <sys/kernel.h>
@@ -60,6 +60,7 @@
 #include <dev/dec/clockvar.h>
 
 #include "opt_clock_compat_osf1.h"
+#include "opt_ntp.h"
 
 #define MINYEAR 1998 /* "today" */
 #ifdef CLOCK_COMPAT_OSF1
@@ -75,6 +76,10 @@
 #define UNIX_YEAR_OFFSET 0
 #endif
 
+#ifdef NTP
+extern long time_precision;    /* kern_clock.c; clock resolution in microseconds. */
+#endif
+
 struct device *clockdev;
 const struct clockfns *clockfns;
 int clockinitted;
@@ -131,6 +136,13 @@
                tickfix >>= (ftp - 1);
                tickfixinterval = hz >> (ftp - 1);
         }
+#ifdef NTP
+       /*
+        * Since we don't have a "real" microtime, our actual
+        * precision is limited to the hardclock interrupt rate.
+        */
+       time_precision = tick;
+#endif
 
        /*
         * Establish the clock interrupt; it's a special case.



Home | Main Index | Thread Index | Old Index