Initialize time_second to 1 instead of zero to pacify slightly bogus arp code.
Various minor style fixes from BDE.
This commit is contained in:
parent
8c21a84e58
commit
d26e256ae9
@ -15,8 +15,8 @@
|
|||||||
#include <sys/kernel.h>
|
#include <sys/kernel.h>
|
||||||
#include <sys/sysctl.h>
|
#include <sys/sysctl.h>
|
||||||
#include <sys/systm.h>
|
#include <sys/systm.h>
|
||||||
#include <sys/timetc.h>
|
|
||||||
#include <sys/timepps.h>
|
#include <sys/timepps.h>
|
||||||
|
#include <sys/timetc.h>
|
||||||
#include <sys/timex.h>
|
#include <sys/timex.h>
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -77,7 +77,7 @@ static struct timehands *volatile timehands = &th0;
|
|||||||
struct timecounter *timecounter = &dummy_timecounter;
|
struct timecounter *timecounter = &dummy_timecounter;
|
||||||
static struct timecounter *timecounters = &dummy_timecounter;
|
static struct timecounter *timecounters = &dummy_timecounter;
|
||||||
|
|
||||||
time_t time_second;
|
time_t time_second = 1;
|
||||||
|
|
||||||
static struct bintime boottimebin;
|
static struct bintime boottimebin;
|
||||||
struct timeval boottime;
|
struct timeval boottime;
|
||||||
@ -155,8 +155,6 @@ microuptime(struct timeval *tvp)
|
|||||||
bintime2timeval(&bt, tvp);
|
bintime2timeval(&bt, tvp);
|
||||||
}
|
}
|
||||||
|
|
||||||
#define SYNC_TIME
|
|
||||||
|
|
||||||
void
|
void
|
||||||
bintime(struct bintime *bt)
|
bintime(struct bintime *bt)
|
||||||
{
|
{
|
||||||
@ -385,7 +383,7 @@ tc_windup(void)
|
|||||||
th->th_offset_count = ncount;
|
th->th_offset_count = ncount;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*-?
|
/*-
|
||||||
* Recalculate the scaling factor. We want the number of 1/2^64
|
* Recalculate the scaling factor. We want the number of 1/2^64
|
||||||
* fractions of a second per period of the hardware counter, taking
|
* fractions of a second per period of the hardware counter, taking
|
||||||
* into account the th_adjustment factor which the NTP PLL/adjtime(2)
|
* into account the th_adjustment factor which the NTP PLL/adjtime(2)
|
||||||
@ -676,7 +674,7 @@ inittimecounter(void *dummy)
|
|||||||
p = (tc_tick * 1000000) / hz;
|
p = (tc_tick * 1000000) / hz;
|
||||||
printf("Timecounters tick every %d.%03u msec\n", p / 1000, p % 1000);
|
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);
|
||||||
(void)timecounter->tc_get_timecount(timecounter);
|
(void)timecounter->tc_get_timecount(timecounter);
|
||||||
tc_ticktock(NULL);
|
tc_ticktock(NULL);
|
||||||
|
@ -45,7 +45,7 @@ struct timecounter {
|
|||||||
* events. Normal hardware does not need it but timecounters
|
* events. Normal hardware does not need it but timecounters
|
||||||
* which latch PPS in hardware (like sys/pci/xrpu.c) do.
|
* 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. */
|
/* This mask should mask off any unimplemented bits. */
|
||||||
u_int32_t tc_frequency;
|
u_int32_t tc_frequency;
|
||||||
/* Frequency of the counter in Hz. */
|
/* Frequency of the counter in Hz. */
|
||||||
|
Loading…
Reference in New Issue
Block a user