Deleted Added
full compact
vm_meter.c (12820) vm_meter.c (14531)
1/*
2 * Copyright (c) 1982, 1986, 1989, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

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

26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 * SUCH DAMAGE.
32 *
33 * @(#)vm_meter.c 8.4 (Berkeley) 1/4/94
1/*
2 * Copyright (c) 1982, 1986, 1989, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

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

26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 * SUCH DAMAGE.
32 *
33 * @(#)vm_meter.c 8.4 (Berkeley) 1/4/94
34 * $Id: vm_meter.c,v 1.12 1995/12/10 14:52:10 bde Exp $
34 * $Id: vm_meter.c,v 1.13 1995/12/14 09:55:02 phk Exp $
35 */
36
37#include <sys/param.h>
38#include <sys/proc.h>
39#include <sys/systm.h>
40#include <sys/kernel.h>
41#include <sys/vmmeter.h>
42#include <sys/queue.h>

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

73 * 1, 5 and 15 minute intervals.
74 */
75static void
76loadav(struct loadavg *avg)
77{
78 register int i, nrun;
79 register struct proc *p;
80
35 */
36
37#include <sys/param.h>
38#include <sys/proc.h>
39#include <sys/systm.h>
40#include <sys/kernel.h>
41#include <sys/vmmeter.h>
42#include <sys/queue.h>

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

73 * 1, 5 and 15 minute intervals.
74 */
75static void
76loadav(struct loadavg *avg)
77{
78 register int i, nrun;
79 register struct proc *p;
80
81 for (nrun = 0, p = (struct proc *) allproc; p != NULL; p = p->p_next) {
81 for (nrun = 0, p = allproc.lh_first; p != 0; p = p->p_list.le_next) {
82 switch (p->p_stat) {
83 case SSLEEP:
84 if (p->p_priority > PZERO || p->p_slptime != 0)
85 continue;
86 /* fall through */
87 case SRUN:
88 case SIDL:
89 nrun++;

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

138 */
139 for (object = vm_object_list.tqh_first;
140 object != NULL;
141 object = object->object_list.tqe_next)
142 object->flags &= ~OBJ_ACTIVE;
143 /*
144 * Calculate process statistics.
145 */
82 switch (p->p_stat) {
83 case SSLEEP:
84 if (p->p_priority > PZERO || p->p_slptime != 0)
85 continue;
86 /* fall through */
87 case SRUN:
88 case SIDL:
89 nrun++;

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

138 */
139 for (object = vm_object_list.tqh_first;
140 object != NULL;
141 object = object->object_list.tqe_next)
142 object->flags &= ~OBJ_ACTIVE;
143 /*
144 * Calculate process statistics.
145 */
146 for (p = (struct proc *) allproc; p != NULL; p = p->p_next) {
146 for (p = allproc.lh_first; p != 0; p = p->p_list.le_next) {
147 if (p->p_flag & P_SYSTEM)
148 continue;
149 switch (p->p_stat) {
150 case 0:
151 continue;
152
153 case SSLEEP:
154 case SSTOP:

--- 64 unchanged lines hidden ---
147 if (p->p_flag & P_SYSTEM)
148 continue;
149 switch (p->p_stat) {
150 case 0:
151 continue;
152
153 case SSLEEP:
154 case SSTOP:

--- 64 unchanged lines hidden ---