Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/kern Adjust kinfo_proc2's p_schedflags assignment to mat...



details:   https://anonhg.NetBSD.org/src/rev/45abb7f27c3c
branches:  trunk
changeset: 486619:45abb7f27c3c
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Fri May 26 22:59:31 2000 +0000

description:
Adjust kinfo_proc2's p_schedflags assignment to match new reality.

diffstat:

 sys/kern/kern_sysctl.c |  9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diffs (23 lines):

diff -r c709098587f1 -r 45abb7f27c3c sys/kern/kern_sysctl.c
--- a/sys/kern/kern_sysctl.c    Fri May 26 21:31:00 2000 +0000
+++ b/sys/kern/kern_sysctl.c    Fri May 26 22:59:31 2000 +0000
@@ -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 @@
        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;



Home | Main Index | Thread Index | Old Index