Deleted Added
full compact
kern_clock.c (12662) kern_clock.c (12913)
1/*-
2 * Copyright (c) 1982, 1986, 1991, 1993
3 * The Regents of the University of California. All rights reserved.
4 * (c) UNIX System Laboratories, Inc.
5 * All or some portions of this file are derived from material licensed
6 * to the University of California by American Telephone and Telegraph
7 * Co. or Unix System Laboratories, Inc. and are reproduced herein with
8 * the permission of UNIX System Laboratories, Inc.

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

31 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
32 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
33 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
34 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
35 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
36 * SUCH DAMAGE.
37 *
38 * @(#)kern_clock.c 8.5 (Berkeley) 1/21/94
1/*-
2 * Copyright (c) 1982, 1986, 1991, 1993
3 * The Regents of the University of California. All rights reserved.
4 * (c) UNIX System Laboratories, Inc.
5 * All or some portions of this file are derived from material licensed
6 * to the University of California by American Telephone and Telegraph
7 * Co. or Unix System Laboratories, Inc. and are reproduced herein with
8 * the permission of UNIX System Laboratories, Inc.

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

31 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
32 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
33 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
34 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
35 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
36 * SUCH DAMAGE.
37 *
38 * @(#)kern_clock.c 8.5 (Berkeley) 1/21/94
39 * $Id: kern_clock.c,v 1.22 1995/12/06 13:27:37 phk Exp $
39 * $Id: kern_clock.c,v 1.23 1995/12/07 12:46:37 davidg Exp $
40 */
41
42/* Portions of this software are covered by the following: */
43/******************************************************************************
44 * *
45 * Copyright (c) David L. Mills 1993, 1994 *
46 * *
47 * Permission to use, copy, modify, and distribute this software and its *

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

78
79#ifdef GPROF
80#include <sys/gmon.h>
81#endif
82
83static void initclocks __P((void *dummy));
84SYSINIT(clocks, SI_SUB_CLOCKS, SI_ORDER_FIRST, initclocks, NULL)
85
40 */
41
42/* Portions of this software are covered by the following: */
43/******************************************************************************
44 * *
45 * Copyright (c) David L. Mills 1993, 1994 *
46 * *
47 * Permission to use, copy, modify, and distribute this software and its *

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

78
79#ifdef GPROF
80#include <sys/gmon.h>
81#endif
82
83static void initclocks __P((void *dummy));
84SYSINIT(clocks, SI_SUB_CLOCKS, SI_ORDER_FIRST, initclocks, NULL)
85
86/* Does anybody else really care about these? */
87struct callout *callfree, *callout, calltodo;
86/* Does anybody else really care about these? (yes, machdep.c) */
87static struct callout calltodo;
88struct callout *callfree, *callout;
88
89/* Some of these don't belong here, but it's easiest to concentrate them. */
89
90/* Some of these don't belong here, but it's easiest to concentrate them. */
90long cp_time[CPUSTATES];
91static long cp_time[CPUSTATES];
91long dk_seek[DK_NDRIVE];
92long dk_seek[DK_NDRIVE];
92long dk_time[DK_NDRIVE];
93static long dk_time[DK_NDRIVE];
93long dk_wds[DK_NDRIVE];
94long dk_wpms[DK_NDRIVE];
95long dk_xfer[DK_NDRIVE];
96
97int dk_busy;
98int dk_ndrive = 0;
99char dk_names[DK_NDRIVE][DK_NAMELEN];
100

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

146 } \
147}
148
149int stathz;
150int profhz;
151int profprocs;
152int ticks;
153static int psdiv, pscnt; /* prof => stat divider */
94long dk_wds[DK_NDRIVE];
95long dk_wpms[DK_NDRIVE];
96long dk_xfer[DK_NDRIVE];
97
98int dk_busy;
99int dk_ndrive = 0;
100char dk_names[DK_NDRIVE][DK_NAMELEN];
101

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

147 } \
148}
149
150int stathz;
151int profhz;
152int profprocs;
153int ticks;
154static int psdiv, pscnt; /* prof => stat divider */
154int psratio; /* ratio: prof / stat */
155static int psratio; /* ratio: prof / stat */
155
156volatile struct timeval time;
157volatile struct timeval mono_time;
158
159/*
160 * Phase-lock loop (PLL) definitions
161 *
162 * The following variables are read and set by the ntp_adjtime() system

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

216 * time_adj is the adjustment added to the value of tick at each timer
217 * interrupt and is recomputed at each timer interrupt.
218 *
219 * time_reftime is the second's portion of the system time on the last
220 * call to ntp_adjtime(). It is used to adjust the time_freq variable
221 * and to increase the time_maxerror as the time since last update
222 * increases.
223 */
156
157volatile struct timeval time;
158volatile struct timeval mono_time;
159
160/*
161 * Phase-lock loop (PLL) definitions
162 *
163 * The following variables are read and set by the ntp_adjtime() system

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

217 * time_adj is the adjustment added to the value of tick at each timer
218 * interrupt and is recomputed at each timer interrupt.
219 *
220 * time_reftime is the second's portion of the system time on the last
221 * call to ntp_adjtime(). It is used to adjust the time_freq variable
222 * and to increase the time_maxerror as the time since last update
223 * increases.
224 */
224long time_phase = 0; /* phase offset (scaled us) */
225static long time_phase = 0; /* phase offset (scaled us) */
225long time_freq = 0; /* frequency offset (scaled ppm) */
226long time_freq = 0; /* frequency offset (scaled ppm) */
226long time_adj = 0; /* tick adjust (scaled 1 / hz) */
227long time_reftime = 0; /* time at last adjustment (s) */
227static long time_adj = 0; /* tick adjust (scaled 1 / hz) */
228static long time_reftime = 0; /* time at last adjustment (s) */
228
229#ifdef PPS_SYNC
230/*
231 * The following variables are used only if the if the kernel PPS
232 * discipline code is configured (PPS_SYNC). The scale factors are
233 * defined in the timex.h header file.
234 *
235 * pps_time contains the time at each calibration interval, as read by

--- 926 unchanged lines hidden ---
229
230#ifdef PPS_SYNC
231/*
232 * The following variables are used only if the if the kernel PPS
233 * discipline code is configured (PPS_SYNC). The scale factors are
234 * defined in the timex.h header file.
235 *
236 * pps_time contains the time at each calibration interval, as read by

--- 926 unchanged lines hidden ---