From 3fc0f8b973fdc2f392a3234d653e09d71e2aab98 Mon Sep 17 00:00:00 2001 From: jeff Date: Mon, 17 Sep 2007 05:31:39 +0000 Subject: - 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) --- bin/ps/ps.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'bin/ps/ps.c') diff --git a/bin/ps/ps.c b/bin/ps/ps.c index 73a6121..ee2b7f8 100644 --- a/bin/ps/ps.c +++ b/bin/ps/ps.c @@ -994,13 +994,13 @@ fmt(char **(*fn)(kvm_t *, const struct kinfo_proc *, int), KINFO *ki, return (s); } -#define UREADOK(ki) (forceuread || (ki->ki_p->ki_sflag & PS_INMEM)) +#define UREADOK(ki) (forceuread || (ki->ki_p->ki_flag & P_INMEM)) static void saveuser(KINFO *ki) { - if (ki->ki_p->ki_sflag & PS_INMEM) { + if (ki->ki_p->ki_flag & P_INMEM) { /* * The u-area might be swapped out, and we can't get * at it because we have a crashdump and no swap. -- cgit v1.1