Deleted Added
full compact
procfs_status.c (164936) procfs_status.c (170307)
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 *

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

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 * @(#)procfs_status.c 8.4 (Berkeley) 6/15/94
34 *
35 * From:
36 * $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 *

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

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 * @(#)procfs_status.c 8.4 (Berkeley) 6/15/94
34 *
35 * From:
36 * $Id: procfs_status.c,v 3.1 1993/12/15 09:40:17 jsp Exp $
37 * $FreeBSD: head/sys/fs/procfs/procfs_status.c 164936 2006-12-06 06:34:57Z julian $
37 * $FreeBSD: head/sys/fs/procfs/procfs_status.c 170307 2007-06-05 00:00:57Z jeff $
38 */
39
40#include <sys/param.h>
41#include <sys/kernel.h>
42#include <sys/systm.h>
43#include <sys/exec.h>
44#include <sys/lock.h>
45#include <sys/mutex.h>

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

107 sbuf_printf(sb, "%ssldr", sep);
108 sep = ",";
109 }
110 SESS_UNLOCK(sess);
111 if (*sep != ',') {
112 sbuf_printf(sb, "noflags");
113 }
114
38 */
39
40#include <sys/param.h>
41#include <sys/kernel.h>
42#include <sys/systm.h>
43#include <sys/exec.h>
44#include <sys/lock.h>
45#include <sys/mutex.h>

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

107 sbuf_printf(sb, "%ssldr", sep);
108 sep = ",";
109 }
110 SESS_UNLOCK(sess);
111 if (*sep != ',') {
112 sbuf_printf(sb, "noflags");
113 }
114
115 mtx_lock_spin(&sched_lock);
115 PROC_SLOCK(p);
116#ifdef KSE
117 if (p->p_flag & P_SA)
118 wmesg = "-kse- ";
119 else
120#endif
121 {
122 tdfirst = FIRST_THREAD_IN_PROC(p);
123 if (tdfirst->td_wchan != NULL) {
124 KASSERT(tdfirst->td_wmesg != NULL,
125 ("wchan %p has no wmesg", tdfirst->td_wchan));
126 wmesg = tdfirst->td_wmesg;
127 } else
128 wmesg = "nochan";
129 }
116#ifdef KSE
117 if (p->p_flag & P_SA)
118 wmesg = "-kse- ";
119 else
120#endif
121 {
122 tdfirst = FIRST_THREAD_IN_PROC(p);
123 if (tdfirst->td_wchan != NULL) {
124 KASSERT(tdfirst->td_wmesg != NULL,
125 ("wchan %p has no wmesg", tdfirst->td_wchan));
126 wmesg = tdfirst->td_wmesg;
127 } else
128 wmesg = "nochan";
129 }
130 mtx_unlock_spin(&sched_lock);
130 PROC_SUNLOCK(p);
131
132 if (p->p_sflag & PS_INMEM) {
133 struct timeval start, ut, st;
134
135 calcru(p, &ut, &st);
136 start = p->p_stats->p_start;
137 timevaladd(&start, &boottime);
138 sbuf_printf(sb, " %jd,%ld %jd,%ld %jd,%ld",

--- 86 unchanged lines hidden ---
131
132 if (p->p_sflag & PS_INMEM) {
133 struct timeval start, ut, st;
134
135 calcru(p, &ut, &st);
136 start = p->p_stats->p_start;
137 timevaladd(&start, &boottime);
138 sbuf_printf(sb, " %jd,%ld %jd,%ld %jd,%ld",

--- 86 unchanged lines hidden ---