Deleted Added
full compact
kern_clock.c (139315) kern_clock.c (146799)
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.

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

30 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
31 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32 * SUCH DAMAGE.
33 *
34 * @(#)kern_clock.c 8.5 (Berkeley) 1/21/94
35 */
36
37#include <sys/cdefs.h>
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.

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

30 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
31 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32 * SUCH DAMAGE.
33 *
34 * @(#)kern_clock.c 8.5 (Berkeley) 1/21/94
35 */
36
37#include <sys/cdefs.h>
38__FBSDID("$FreeBSD: head/sys/kern/kern_clock.c 139315 2004-12-26 00:14:21Z jeff $");
38__FBSDID("$FreeBSD: head/sys/kern/kern_clock.c 146799 2005-05-30 06:29:29Z jkoshy $");
39
40#include "opt_ntp.h"
41#include "opt_watchdog.h"
42
43#include <sys/param.h>
44#include <sys/systm.h>
45#include <sys/callout.h>
46#include <sys/kdb.h>

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

64#include <sys/timetc.h>
65
66#include <machine/cpu.h>
67
68#ifdef GPROF
69#include <sys/gmon.h>
70#endif
71
39
40#include "opt_ntp.h"
41#include "opt_watchdog.h"
42
43#include <sys/param.h>
44#include <sys/systm.h>
45#include <sys/callout.h>
46#include <sys/kdb.h>

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

64#include <sys/timetc.h>
65
66#include <machine/cpu.h>
67
68#ifdef GPROF
69#include <sys/gmon.h>
70#endif
71
72#ifdef HWPMC_HOOKS
73#include <sys/pmckern.h>
74#endif
75
72#ifdef DEVICE_POLLING
73extern void hardclock_device_poll(void);
74#endif /* DEVICE_POLLING */
75
76static void initclocks(void *dummy);
77SYSINIT(clocks, SI_SUB_CLOCKS, SI_ORDER_FIRST, initclocks, NULL)
78
79/* Some of these don't belong here, but it's easiest to concentrate them. */

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

186 }
187 if (timevalisset(&pstats->p_timer[ITIMER_PROF].it_value) &&
188 itimerdecr(&pstats->p_timer[ITIMER_PROF], tick) == 0) {
189 p->p_sflag |= PS_PROFPEND;
190 td->td_flags |= TDF_ASTPENDING;
191 }
192 }
193 mtx_unlock_spin_flags(&sched_lock, MTX_QUIET);
76#ifdef DEVICE_POLLING
77extern void hardclock_device_poll(void);
78#endif /* DEVICE_POLLING */
79
80static void initclocks(void *dummy);
81SYSINIT(clocks, SI_SUB_CLOCKS, SI_ORDER_FIRST, initclocks, NULL)
82
83/* Some of these don't belong here, but it's easiest to concentrate them. */

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

190 }
191 if (timevalisset(&pstats->p_timer[ITIMER_PROF].it_value) &&
192 itimerdecr(&pstats->p_timer[ITIMER_PROF], tick) == 0) {
193 p->p_sflag |= PS_PROFPEND;
194 td->td_flags |= TDF_ASTPENDING;
195 }
196 }
197 mtx_unlock_spin_flags(&sched_lock, MTX_QUIET);
198
199#ifdef HWPMC_HOOKS
200 if (PMC_CPU_HAS_SAMPLES(PCPU_GET(cpuid)))
201 PMC_CALL_HOOK_UNLOCKED(curthread, PMC_FN_DO_SAMPLES, NULL);
202#endif
194}
195
196/*
197 * The real-time timer, interrupting hz times per second.
198 */
199void
200hardclock(frame)
201 register struct clockframe *frame;

--- 351 unchanged lines hidden ---
203}
204
205/*
206 * The real-time timer, interrupting hz times per second.
207 */
208void
209hardclock(frame)
210 register struct clockframe *frame;

--- 351 unchanged lines hidden ---