Deleted Added
full compact
kern_clock.c (68923) kern_clock.c (70861)
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 * $FreeBSD: head/sys/kern/kern_clock.c 68923 2000-11-20 00:44:58Z rwatson $
39 * $FreeBSD: head/sys/kern/kern_clock.c 70861 2001-01-10 04:43:51Z jake $
40 */
41
42#include "opt_ntp.h"
43
44#include <sys/param.h>
45#include <sys/systm.h>
46#include <sys/dkstat.h>
47#include <sys/callout.h>

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

155void
156hardclock(frame)
157 register struct clockframe *frame;
158{
159 register struct proc *p;
160 int need_softclock = 0;
161
162 p = curproc;
40 */
41
42#include "opt_ntp.h"
43
44#include <sys/param.h>
45#include <sys/systm.h>
46#include <sys/dkstat.h>
47#include <sys/callout.h>

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

155void
156hardclock(frame)
157 register struct clockframe *frame;
158{
159 register struct proc *p;
160 int need_softclock = 0;
161
162 p = curproc;
163 if (p != idleproc) {
163 if (p != PCPU_GET(idleproc)) {
164 register struct pstats *pstats;
165
166 /*
167 * Run current process's virtual and profile time, as needed.
168 */
169 pstats = p->p_stats;
170 if (CLKF_USERMODE(frame) &&
171 timevalisset(&pstats->p_timer[ITIMER_VIRTUAL].it_value) &&

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

395 * in ``non-process'' (i.e., interrupt) work.
396 */
397 p = curproc;
398 if ((p->p_ithd != NULL) || CLKF_INTR(frame)) {
399 p->p_iticks++;
400 cp_time[CP_INTR]++;
401 } else {
402 p->p_sticks++;
164 register struct pstats *pstats;
165
166 /*
167 * Run current process's virtual and profile time, as needed.
168 */
169 pstats = p->p_stats;
170 if (CLKF_USERMODE(frame) &&
171 timevalisset(&pstats->p_timer[ITIMER_VIRTUAL].it_value) &&

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

395 * in ``non-process'' (i.e., interrupt) work.
396 */
397 p = curproc;
398 if ((p->p_ithd != NULL) || CLKF_INTR(frame)) {
399 p->p_iticks++;
400 cp_time[CP_INTR]++;
401 } else {
402 p->p_sticks++;
403 if (p != idleproc)
403 if (p != PCPU_GET(idleproc))
404 cp_time[CP_SYS]++;
405 else
406 cp_time[CP_IDLE]++;
407 }
408 }
409 pscnt = psdiv;
410
411 schedclock(p);

--- 36 unchanged lines hidden ---
404 cp_time[CP_SYS]++;
405 else
406 cp_time[CP_IDLE]++;
407 }
408 }
409 pscnt = psdiv;
410
411 schedclock(p);

--- 36 unchanged lines hidden ---