Deleted Added
full compact
vm_meter.c (22975) vm_meter.c (25164)
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$
34 * $Id: vm_meter.c,v 1.20 1997/02/22 09:48:25 peter 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>

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

74 */
75static void
76loadav(struct loadavg *avg)
77{
78 register int i, nrun;
79 register struct proc *p;
80
81 for (nrun = 0, p = allproc.lh_first; p != 0; p = p->p_list.le_next) {
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>

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

74 */
75static void
76loadav(struct loadavg *avg)
77{
78 register int i, nrun;
79 register struct proc *p;
80
81 for (nrun = 0, p = allproc.lh_first; p != 0; p = p->p_list.le_next) {
82 if (p->p_flag & P_IDLEPROC)
83 continue;
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++;

--- 129 unchanged lines hidden ---
84 switch (p->p_stat) {
85 case SSLEEP:
86 if (p->p_priority > PZERO || p->p_slptime != 0)
87 continue;
88 /* fall through */
89 case SRUN:
90 case SIDL:
91 nrun++;

--- 129 unchanged lines hidden ---