diff options
author | phk <phk@FreeBSD.org> | 2002-04-27 07:28:54 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2002-04-27 07:28:54 +0000 |
commit | bcaaa89ad095d7a175927dd7e531fa6f278ed18e (patch) | |
tree | 26ec88e3baa8a3cd5eb622e0087c044591c6d15d /sys/kern | |
parent | 3cc313c2e55d5e5e7495f85a144a537ae17fc423 (diff) | |
download | FreeBSD-src-bcaaa89ad095d7a175927dd7e531fa6f278ed18e.zip FreeBSD-src-bcaaa89ad095d7a175927dd7e531fa6f278ed18e.tar.gz |
Explain magic number.
Add magic date no explanation.
Add a delta which was lost in transit yesterday which prevented
other timecounters from actually being used.
Diffstat (limited to 'sys/kern')
-rw-r--r-- | sys/kern/kern_tc.c | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/sys/kern/kern_tc.c b/sys/kern/kern_tc.c index 969393c..b019695 100644 --- a/sys/kern/kern_tc.c +++ b/sys/kern/kern_tc.c @@ -66,8 +66,17 @@ static struct timehands th4 = { NULL, 0, 0, 0, {0, 0}, {0, 0}, {0, 0}, 1, &th5}; static struct timehands th3 = { NULL, 0, 0, 0, {0, 0}, {0, 0}, {0, 0}, 1, &th4}; static struct timehands th2 = { NULL, 0, 0, 0, {0, 0}, {0, 0}, {0, 0}, 1, &th3}; static struct timehands th1 = { NULL, 0, 0, 0, {0, 0}, {0, 0}, {0, 0}, 1, &th2}; -static struct timehands th0 = - { &dummy_timecounter, 0, 18446744073709ULL, 0, {1, 0}, {0, 0}, {0, 0}, 1, &th1}; +static struct timehands th0 = { + &dummy_timecounter, + 0, + 18446744073709ULL, /* 2^64/1000000 */ + 0, + {769769981, 0}, /* Tue May 24 08:59:41 GMT 1994 */ + {0, 0}, + {0, 0}, + 1, + &th1 +}; static struct timehands *volatile timehands = &th0; struct timecounter *timecounter = &dummy_timecounter; @@ -340,6 +349,10 @@ tc_windup(void) tco->tc_counter->tc_poll_pps(tco->tc_counter); for (i = tc->tc_offset.sec - tco->tc_offset.sec; i > 0; i--) ntp_update_second(&tc->tc_adjustment, &tc->tc_offset.sec); + if (tc->tc_counter != timecounter) { + tc->tc_counter = timecounter; + tc->tc_offset_count = ncount; + } tc_setscales(tc); bt = tc->tc_offset; |