Skip site navigation (1)Skip section navigation (2)
Date:      12 Feb 2002 01:40:56 -0500
From:      Joe Clarke <marcus@marcuscom.com>
To:        freebsd-current@freebsd.org
Subject:   Change to sys/sys/proc.h broke -current
Message-ID:  <1013496057.70211.49.camel@shumai.marcuscom.com>

index | next in thread | raw e-mail

[-- Attachment #1 --]
I hadn't seen this reported in the archives yet, but the recent change
to sys/sys/proc.h removed the kg_pri struct member.  This member is
still referenced in lib/libkvm/kvm_proc.c at line 331, and
sys/kern/kern_poll.c.  I assume the fix for kvm_proc.c and kern_poll.c
would be something like the attached.

Joe



[-- Attachment #2 --]
--- lib/libkvm/kvm_proc.c.orig	Tue Feb 12 00:58:37 2002
+++ lib/libkvm/kvm_proc.c	Tue Feb 12 01:14:40 2002
@@ -320,15 +320,18 @@
 		kp->ki_xstat = proc.p_xstat;
 		kp->ki_acflag = proc.p_acflag;
 		kp->ki_pctcpu = proc.p_kse.ke_pctcpu;		/* XXXKSE */
-		kp->ki_estcpu = proc.p_ksegrp.kg_estcpu;	/* XXXKSE */
-		kp->ki_slptime = proc.p_kse.ke_slptime;		/* XXXKSE */
+		kp->ki_estcpu = mainthread.td_ksegrp->kg_estcpu;	/* XXXKSE */
+		kp->ki_slptime = mainthread.td_ksegrp->kg_slptime;		/* XXXKSE */
 		kp->ki_swtime = proc.p_swtime;
 		kp->ki_flag = proc.p_flag;
 		kp->ki_sflag = proc.p_sflag;
 		kp->ki_wchan = mainthread.td_wchan;		/* XXXKSE */
 		kp->ki_traceflag = proc.p_traceflag;
 		kp->ki_stat = proc.p_stat;
-		kp->ki_pri = proc.p_ksegrp.kg_pri;		/* XXXKSE */
+		kp->ki_pri.pri_level = mainthread.td_priority;
+		kp->ki_pri.pri_user = mainthread.td_ksegrp->kg_user_pri;
+		kp->ki_pri.pri_class = mainthread.td_ksegrp->kg_pri_class;
+		kp->ki_pri.pri_native = mainthread.td_base_pri;
 		kp->ki_nice = proc.p_ksegrp.kg_nice;		/* XXXKSE */
 		kp->ki_lock = proc.p_lock;
 		kp->ki_rqindex = proc.p_kse.ke_rqindex;		/* XXXKSE */

[-- Attachment #3 --]
--- sys/kern/kern_poll.c.orig	Tue Feb 12 01:34:43 2002
+++ sys/kern/kern_poll.c	Tue Feb 12 01:38:15 2002
@@ -482,7 +482,7 @@
 	rtp.prio = RTP_PRIO_MAX;	/* lowest priority */
 	rtp.type = RTP_PRIO_IDLE;
 	mtx_lock_spin(&sched_lock);
-	rtp_to_pri(&rtp, &td->td_ksegrp->kg_pri);
+	rtp_to_pri(&rtp, td->td_ksegrp);
 	pri = td->td_priority;
 	mtx_unlock_spin(&sched_lock);
 
help

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1013496057.70211.49.camel>