Deleted Added
full compact
procfs_status.c (90717) procfs_status.c (91140)
1/*
2 * Copyright (c) 1993 Jan-Simon Pendry
3 * Copyright (c) 1993
4 * The Regents of the University of California. All rights reserved.
5 *
6 * This code is derived from software contributed to Berkeley by
7 * Jan-Simon Pendry.
8 *

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

33 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
34 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
35 * SUCH DAMAGE.
36 *
37 * @(#)procfs_status.c 8.4 (Berkeley) 6/15/94
38 *
39 * From:
40 * $Id: procfs_status.c,v 3.1 1993/12/15 09:40:17 jsp Exp $
1/*
2 * Copyright (c) 1993 Jan-Simon Pendry
3 * Copyright (c) 1993
4 * The Regents of the University of California. All rights reserved.
5 *
6 * This code is derived from software contributed to Berkeley by
7 * Jan-Simon Pendry.
8 *

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

33 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
34 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
35 * SUCH DAMAGE.
36 *
37 * @(#)procfs_status.c 8.4 (Berkeley) 6/15/94
38 *
39 * From:
40 * $Id: procfs_status.c,v 3.1 1993/12/15 09:40:17 jsp Exp $
41 * $FreeBSD: head/sys/fs/procfs/procfs_status.c 90717 2002-02-16 05:59:26Z bde $
41 * $FreeBSD: head/sys/fs/procfs/procfs_status.c 91140 2002-02-23 11:12:57Z tanimura $
42 */
43
44#include <sys/param.h>
45#include <sys/systm.h>
46#include <sys/exec.h>
47#include <sys/lock.h>
48#include <sys/mutex.h>
49#include <sys/jail.h>
50#include <sys/malloc.h>
42 */
43
44#include <sys/param.h>
45#include <sys/systm.h>
46#include <sys/exec.h>
47#include <sys/lock.h>
48#include <sys/mutex.h>
49#include <sys/jail.h>
50#include <sys/malloc.h>
51#include <sys/mutex.h>
52#include <sys/sx.h>
51#include <sys/proc.h>
52#include <sys/resourcevar.h>
53#include <sys/sbuf.h>
54#include <sys/tty.h>
55
56#include <vm/vm.h>
57#include <vm/pmap.h>
58#include <vm/vm_param.h>

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

70 char *pc;
71 char *sep;
72 int pid, ppid, pgid, sid;
73 int i;
74
75 pid = p->p_pid;
76 PROC_LOCK(p);
77 ppid = p->p_pptr ? p->p_pptr->p_pid : 0;
53#include <sys/proc.h>
54#include <sys/resourcevar.h>
55#include <sys/sbuf.h>
56#include <sys/tty.h>
57
58#include <vm/vm.h>
59#include <vm/pmap.h>
60#include <vm/vm_param.h>

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

72 char *pc;
73 char *sep;
74 int pid, ppid, pgid, sid;
75 int i;
76
77 pid = p->p_pid;
78 PROC_LOCK(p);
79 ppid = p->p_pptr ? p->p_pptr->p_pid : 0;
78 PROC_UNLOCK(p);
79 pgid = p->p_pgrp->pg_id;
80 sess = p->p_pgrp->pg_session;
80 pgid = p->p_pgrp->pg_id;
81 sess = p->p_pgrp->pg_session;
82 SESS_LOCK(sess);
81 sid = sess->s_leader ? sess->s_leader->p_pid : 0;
82
83/* comm pid ppid pgid sid maj,min ctty,sldr start ut st wmsg
84 euid ruid rgid,egid,groups[1 .. NGROUPS]
85*/
86
87 pc = p->p_comm;
88 do {

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

101 if (sess->s_ttyvp) {
102 sbuf_printf(sb, "%sctty", sep);
103 sep = ",";
104 }
105 if (SESS_LEADER(p)) {
106 sbuf_printf(sb, "%ssldr", sep);
107 sep = ",";
108 }
83 sid = sess->s_leader ? sess->s_leader->p_pid : 0;
84
85/* comm pid ppid pgid sid maj,min ctty,sldr start ut st wmsg
86 euid ruid rgid,egid,groups[1 .. NGROUPS]
87*/
88
89 pc = p->p_comm;
90 do {

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

103 if (sess->s_ttyvp) {
104 sbuf_printf(sb, "%sctty", sep);
105 sep = ",";
106 }
107 if (SESS_LEADER(p)) {
108 sbuf_printf(sb, "%ssldr", sep);
109 sep = ",";
110 }
111 SESS_UNLOCK(sess);
112 PROC_UNLOCK(p);
109 if (*sep != ',') {
110 sbuf_printf(sb, "noflags");
111 }
112
113 mtx_lock_spin(&sched_lock);
114 if (p->p_sflag & PS_INMEM) {
115 struct timeval ut, st;
116

--- 79 unchanged lines hidden ---
113 if (*sep != ',') {
114 sbuf_printf(sb, "noflags");
115 }
116
117 mtx_lock_spin(&sched_lock);
118 if (p->p_sflag & PS_INMEM) {
119 struct timeval ut, st;
120

--- 79 unchanged lines hidden ---