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>

next in thread | raw e-mail | index | archive | help

--=-MFqUcUYhQ2eFJjFak6Jz
Content-Type: text/plain
Content-Transfer-Encoding: 7bit

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



--=-MFqUcUYhQ2eFJjFak6Jz
Content-Disposition: attachment; filename=kvm_proc.c.patch
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain; charset=ISO-8859-1

--- 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 =3D proc.p_xstat;
 		kp->ki_acflag =3D proc.p_acflag;
 		kp->ki_pctcpu =3D proc.p_kse.ke_pctcpu;		/* XXXKSE */
-		kp->ki_estcpu =3D proc.p_ksegrp.kg_estcpu;	/* XXXKSE */
-		kp->ki_slptime =3D proc.p_kse.ke_slptime;		/* XXXKSE */
+		kp->ki_estcpu =3D mainthread.td_ksegrp->kg_estcpu;	/* XXXKSE */
+		kp->ki_slptime =3D mainthread.td_ksegrp->kg_slptime;		/* XXXKSE */
 		kp->ki_swtime =3D proc.p_swtime;
 		kp->ki_flag =3D proc.p_flag;
 		kp->ki_sflag =3D proc.p_sflag;
 		kp->ki_wchan =3D mainthread.td_wchan;		/* XXXKSE */
 		kp->ki_traceflag =3D proc.p_traceflag;
 		kp->ki_stat =3D proc.p_stat;
-		kp->ki_pri =3D proc.p_ksegrp.kg_pri;		/* XXXKSE */
+		kp->ki_pri.pri_level =3D mainthread.td_priority;
+		kp->ki_pri.pri_user =3D mainthread.td_ksegrp->kg_user_pri;
+		kp->ki_pri.pri_class =3D mainthread.td_ksegrp->kg_pri_class;
+		kp->ki_pri.pri_native =3D mainthread.td_base_pri;
 		kp->ki_nice =3D proc.p_ksegrp.kg_nice;		/* XXXKSE */
 		kp->ki_lock =3D proc.p_lock;
 		kp->ki_rqindex =3D proc.p_kse.ke_rqindex;		/* XXXKSE */

--=-MFqUcUYhQ2eFJjFak6Jz
Content-Disposition: attachment; filename=kern_poll.c.patch
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain; charset=ISO-8859-1

--- 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 =3D RTP_PRIO_MAX;	/* lowest priority */
 	rtp.type =3D 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 =3D td->td_priority;
 	mtx_unlock_spin(&sched_lock);
=20

--=-MFqUcUYhQ2eFJjFak6Jz--


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




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