Deleted Added
full compact
kern_tc.c (237474) kern_tc.c (238537)
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 * Copyright (c) 2011 The FreeBSD Foundation
10 * All rights reserved.
11 *
12 * Portions of this software were developed by Julien Ridoux at the University
13 * of Melbourne under sponsorship from the FreeBSD Foundation.
14 */
15
16#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 * Copyright (c) 2011 The FreeBSD Foundation
10 * All rights reserved.
11 *
12 * Portions of this software were developed by Julien Ridoux at the University
13 * of Melbourne under sponsorship from the FreeBSD Foundation.
14 */
15
16#include <sys/cdefs.h>
17__FBSDID("$FreeBSD: head/sys/kern/kern_tc.c 237474 2012-06-23 09:33:06Z kib $");
17__FBSDID("$FreeBSD: head/sys/kern/kern_tc.c 238537 2012-07-16 20:17:19Z gnn $");
18
19#include "opt_compat.h"
20#include "opt_ntp.h"
21#include "opt_ffclock.h"
22
23#include <sys/param.h>
24#include <sys/kernel.h>
25#ifdef FFCLOCK

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

117
118static int timestepwarnings;
119SYSCTL_INT(_kern_timecounter, OID_AUTO, stepwarnings, CTLFLAG_RW,
120 &timestepwarnings, 0, "Log time steps");
121
122static void tc_windup(void);
123static void cpu_tick_calibrate(int);
124
18
19#include "opt_compat.h"
20#include "opt_ntp.h"
21#include "opt_ffclock.h"
22
23#include <sys/param.h>
24#include <sys/kernel.h>
25#ifdef FFCLOCK

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

117
118static int timestepwarnings;
119SYSCTL_INT(_kern_timecounter, OID_AUTO, stepwarnings, CTLFLAG_RW,
120 &timestepwarnings, 0, "Log time steps");
121
122static void tc_windup(void);
123static void cpu_tick_calibrate(int);
124
125void dtrace_getnanotime(struct timespec *tsp);
126
125static int
126sysctl_kern_boottime(SYSCTL_HANDLER_ARGS)
127{
128#ifndef __mips__
129#ifdef SCTL_MASK32
130 int tv[2];
131
132 if (req->flags & SCTL_MASK32) {

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

955{
956
957 getmicrouptime_fromclock(tvp, sysclock_active);
958}
959
960#endif /* FFCLOCK */
961
962/*
127static int
128sysctl_kern_boottime(SYSCTL_HANDLER_ARGS)
129{
130#ifndef __mips__
131#ifdef SCTL_MASK32
132 int tv[2];
133
134 if (req->flags & SCTL_MASK32) {

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

957{
958
959 getmicrouptime_fromclock(tvp, sysclock_active);
960}
961
962#endif /* FFCLOCK */
963
964/*
965 * This is a clone of getnanotime and used for walltimestamps.
966 * The dtrace_ prefix prevents fbt from creating probes for
967 * it so walltimestamp can be safely used in all fbt probes.
968 */
969void
970dtrace_getnanotime(struct timespec *tsp)
971{
972 struct timehands *th;
973 u_int gen;
974
975 do {
976 th = timehands;
977 gen = th->th_generation;
978 *tsp = th->th_nanotime;
979 } while (gen == 0 || gen != th->th_generation);
980}
981
982/*
963 * System clock currently providing time to the system. Modifiable via sysctl
964 * when the FFCLOCK option is defined.
965 */
966int sysclock_active = SYSCLOCK_FBCK;
967
968/* Internal NTP status and error estimates. */
969extern int time_status;
970extern long time_esterror;

--- 940 unchanged lines hidden ---
983 * System clock currently providing time to the system. Modifiable via sysctl
984 * when the FFCLOCK option is defined.
985 */
986int sysclock_active = SYSCLOCK_FBCK;
987
988/* Internal NTP status and error estimates. */
989extern int time_status;
990extern long time_esterror;

--- 940 unchanged lines hidden ---