Deleted Added
full compact
procfs_status.c (153706) procfs_status.c (163709)
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 153706 2005-12-24 22:22:17Z trhodes $
37 * $FreeBSD: head/sys/fs/procfs/procfs_status.c 163709 2006-10-26 21:42:22Z jb $
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>

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

108 sep = ",";
109 }
110 SESS_UNLOCK(sess);
111 if (*sep != ',') {
112 sbuf_printf(sb, "noflags");
113 }
114
115 mtx_lock_spin(&sched_lock);
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>

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

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

--- 87 unchanged lines hidden ---
137 mtx_unlock_spin(&sched_lock);
138
139 if (p->p_sflag & PS_INMEM) {
140 struct timeval start, ut, st;
141
142 calcru(p, &ut, &st);
143 start = p->p_stats->p_start;
144 timevaladd(&start, &boottime);

--- 87 unchanged lines hidden ---