Deleted Added
full compact
kern_tc.c (210225) kern_tc.c (210226)
1/*-
2 * ----------------------------------------------------------------------------
3 * "THE BEER-WARE LICENSE" (Revision 42):
4 * <phk@FreeBSD.ORG> wrote this file. As long as you retain this notice you
5 * can do whatever you want with this stuff. If we meet some day, and you think
6 * this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp
7 * ----------------------------------------------------------------------------
8 */
9
10#include <sys/cdefs.h>
1/*-
2 * ----------------------------------------------------------------------------
3 * "THE BEER-WARE LICENSE" (Revision 42):
4 * <phk@FreeBSD.ORG> wrote this file. As long as you retain this notice you
5 * can do whatever you want with this stuff. If we meet some day, and you think
6 * this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp
7 * ----------------------------------------------------------------------------
8 */
9
10#include <sys/cdefs.h>
11__FBSDID("$FreeBSD: head/sys/kern/kern_tc.c 210225 2010-07-18 20:23:10Z trasz $");
11__FBSDID("$FreeBSD: head/sys/kern/kern_tc.c 210226 2010-07-18 20:57:53Z trasz $");
12
13#include "opt_ntp.h"
14
15#include <sys/param.h>
16#include <sys/kernel.h>
17#include <sys/sysctl.h>
18#include <sys/syslog.h>
19#include <sys/systm.h>

--- 459 unchanged lines hidden (view full) ---

479 bintime2timespec(&bt, &th->th_nanotime);
480
481 /* Now is a good time to change timecounters. */
482 if (th->th_counter != timecounter) {
483 th->th_counter = timecounter;
484 th->th_offset_count = ncount;
485 }
486
12
13#include "opt_ntp.h"
14
15#include <sys/param.h>
16#include <sys/kernel.h>
17#include <sys/sysctl.h>
18#include <sys/syslog.h>
19#include <sys/systm.h>

--- 459 unchanged lines hidden (view full) ---

479 bintime2timespec(&bt, &th->th_nanotime);
480
481 /* Now is a good time to change timecounters. */
482 if (th->th_counter != timecounter) {
483 th->th_counter = timecounter;
484 th->th_offset_count = ncount;
485 }
486
487 /*
487 /*-
488 * Recalculate the scaling factor. We want the number of 1/2^64
489 * fractions of a second per period of the hardware counter, taking
490 * into account the th_adjustment factor which the NTP PLL/adjtime(2)
491 * processing provides us with.
492 *
493 * The th_adjustment is nanoseconds per second with 32 bit binary
494 * fraction and we want 64 bit binary fraction of second:
495 *

--- 437 unchanged lines hidden ---
488 * Recalculate the scaling factor. We want the number of 1/2^64
489 * fractions of a second per period of the hardware counter, taking
490 * into account the th_adjustment factor which the NTP PLL/adjtime(2)
491 * processing provides us with.
492 *
493 * The th_adjustment is nanoseconds per second with 32 bit binary
494 * fraction and we want 64 bit binary fraction of second:
495 *

--- 437 unchanged lines hidden ---