From 3bcdc30c81737d1c2762d39c5b69a339b44c0045 Mon Sep 17 00:00:00 2001 From: thorpej Date: Fri, 26 May 2000 22:59:31 +0000 Subject: [PATCH] Adjust kinfo_proc2's p_schedflags assignment to match new reality. --- sys/kern/kern_sysctl.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/sys/kern/kern_sysctl.c b/sys/kern/kern_sysctl.c index d291128397a6..652cb2e917a4 100644 --- a/sys/kern/kern_sysctl.c +++ b/sys/kern/kern_sysctl.c @@ -1,4 +1,4 @@ -/* $NetBSD: kern_sysctl.c,v 1.62 2000/05/26 02:23:12 simonb Exp $ */ +/* $NetBSD: kern_sysctl.c,v 1.63 2000/05/26 22:59:31 thorpej Exp $ */ /*- * Copyright (c) 1982, 1986, 1989, 1993 @@ -1225,7 +1225,12 @@ fill_kproc2(p, ki) ki->p_pctcpu = p->p_pctcpu; ki->p_swtime = p->p_swtime; ki->p_slptime = p->p_slptime; - ki->p_schedflags = p->p_schedflags; + /* + * XXX curcpu() is wrong; should be CPU process is running on. + * XXX --thorpej + */ + ki->p_schedflags = (p->p_stat == SONPROC) ? + curcpu()->ci_schedstate.spc_flags : 0; ki->p_uticks = p->p_uticks; ki->p_sticks = p->p_sticks;