summaryrefslogtreecommitdiffstats
path: root/lib/libkvm
diff options
context:
space:
mode:
authorjeff <jeff@FreeBSD.org>2007-09-17 05:31:39 +0000
committerjeff <jeff@FreeBSD.org>2007-09-17 05:31:39 +0000
commit3fc0f8b973fdc2f392a3234d653e09d71e2aab98 (patch)
treee572a7b77f24339d2dc6ebf6b83c1e2c1ce0f6a5 /lib/libkvm
parent74666fdfce0e06484d5f82e8fced0c16c06477d1 (diff)
downloadFreeBSD-src-3fc0f8b973fdc2f392a3234d653e09d71e2aab98.zip
FreeBSD-src-3fc0f8b973fdc2f392a3234d653e09d71e2aab98.tar.gz
- Move all of the PS_ flags into either p_flag or td_flags.
- p_sflag was mostly protected by PROC_LOCK rather than the PROC_SLOCK or previously the sched_lock. These bugs have existed for some time. - Allow swapout to try each thread in a process individually and then swapin the whole process if any of these fail. This allows us to move most scheduler related swap flags into td_flags. - Keep ki_sflag for backwards compat but change all in source tools to use the new and more correct location of P_INMEM. Reported by: pho Reviewed by: attilio, kib Approved by: re (kensmith)
Diffstat (limited to 'lib/libkvm')
-rw-r--r--lib/libkvm/kvm_proc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libkvm/kvm_proc.c b/lib/libkvm/kvm_proc.c
index 598681b..a2e7f33 100644
--- a/lib/libkvm/kvm_proc.c
+++ b/lib/libkvm/kvm_proc.c
@@ -209,7 +209,7 @@ kvm_proclist(kd, what, arg, p, bp, maxcnt)
kp->ki_sigcatch = sigacts.ps_sigcatch;
}
#if 0
- if ((proc.p_sflag & PS_INMEM) && proc.p_stats != NULL) {
+ if ((proc.p_flag & P_INMEM) && proc.p_stats != NULL) {
if (KREAD(kd, (u_long)proc.p_stats, &pstats)) {
_kvm_err(kd, kd->program,
"can't read stats at %x", proc.p_stats);
@@ -370,7 +370,7 @@ nopgrp:
if (proc.p_state != PRS_ZOMBIE) {
kp->ki_swtime = proc.p_swtime;
kp->ki_flag = proc.p_flag;
- kp->ki_sflag = proc.p_sflag;
+ kp->ki_sflag = 0;
kp->ki_nice = proc.p_nice;
kp->ki_traceflag = proc.p_traceflag;
if (proc.p_state == PRS_NORMAL) {
OpenPOWER on IntegriCloud