diff options
author | phk <phk@FreeBSD.org> | 2002-05-03 08:46:03 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2002-05-03 08:46:03 +0000 |
commit | d26e256ae9800ddcf258a18647d887a1b71cc3de (patch) | |
tree | 0a137835db16d0fc03025e85ca8a54769e0f16f6 /sys | |
parent | 8c21a84e58bb1e4c1e603bbf09febad5a37f70a7 (diff) | |
download | FreeBSD-src-d26e256ae9800ddcf258a18647d887a1b71cc3de.zip FreeBSD-src-d26e256ae9800ddcf258a18647d887a1b71cc3de.tar.gz |
Initialize time_second to 1 instead of zero to pacify slightly bogus arp code.
Various minor style fixes from BDE.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/kern/kern_tc.c | 10 | ||||
-rw-r--r-- | sys/sys/timetc.h | 2 |
2 files changed, 5 insertions, 7 deletions
diff --git a/sys/kern/kern_tc.c b/sys/kern/kern_tc.c index 591c733..2f752a6 100644 --- a/sys/kern/kern_tc.c +++ b/sys/kern/kern_tc.c @@ -15,8 +15,8 @@ #include <sys/kernel.h> #include <sys/sysctl.h> #include <sys/systm.h> -#include <sys/timetc.h> #include <sys/timepps.h> +#include <sys/timetc.h> #include <sys/timex.h> /* @@ -77,7 +77,7 @@ static struct timehands *volatile timehands = &th0; struct timecounter *timecounter = &dummy_timecounter; static struct timecounter *timecounters = &dummy_timecounter; -time_t time_second; +time_t time_second = 1; static struct bintime boottimebin; struct timeval boottime; @@ -155,8 +155,6 @@ microuptime(struct timeval *tvp) bintime2timeval(&bt, tvp); } -#define SYNC_TIME - void bintime(struct bintime *bt) { @@ -385,7 +383,7 @@ tc_windup(void) th->th_offset_count = ncount; } - /*-? + /*- * Recalculate the scaling factor. We want the number of 1/2^64 * fractions of a second per period of the hardware counter, taking * into account the th_adjustment factor which the NTP PLL/adjtime(2) @@ -676,7 +674,7 @@ inittimecounter(void *dummy) p = (tc_tick * 1000000) / hz; printf("Timecounters tick every %d.%03u msec\n", p / 1000, p % 1000); - /* warm up new timecounter (again) and get rolling */ + /* warm up new timecounter (again) and get rolling. */ (void)timecounter->tc_get_timecount(timecounter); (void)timecounter->tc_get_timecount(timecounter); tc_ticktock(NULL); diff --git a/sys/sys/timetc.h b/sys/sys/timetc.h index 20356b5..b009030 100644 --- a/sys/sys/timetc.h +++ b/sys/sys/timetc.h @@ -45,7 +45,7 @@ struct timecounter { * events. Normal hardware does not need it but timecounters * which latch PPS in hardware (like sys/pci/xrpu.c) do. */ - u_int tc_counter_mask; + u_int tc_counter_mask; /* This mask should mask off any unimplemented bits. */ u_int32_t tc_frequency; /* Frequency of the counter in Hz. */ |