Subject: Re: Changing struct proc (bintime) (was: CVS commit: src/sys)
To: None <current-users@NetBSD.org>
From: Andrew Doran <ad@netbsd.org>
List: current-users
Date: 12/26/2007 21:14:48
On Wed, Dec 26, 2007 at 09:55:55PM +0100, Bernd Ernesti wrote:
> Hi,
>
> On Sat, Dec 22, 2007 at 01:14:55AM +0000, YAMAMOTO Takashi wrote:
> >
> > Module Name: src
> > Committed By: yamt
> > Date: Sat Dec 22 01:14:55 UTC 2007
> >
> > Modified Files:
> > src/sys/kern: init_main.c init_sysctl.c kern_idle.c kern_lwp.c
> > kern_resource.c kern_softint.c kern_synch.c kern_time.c
> > src/sys/sys: lwp.h proc.h sched.h
> >
> > Log Message:
> > use binuptime for l_stime/l_rtime.
>
> Is there some documentation about bintime, which is now used for p_rtime
> in struct proc?
>
> What was the reason that this was changed?
>
> Right now this is causing a problem for kdebase (pkg/37605).
ps->userTime = p.kp_proc.p_rtime.tv_sec*100+p.kp_proc.p_rtime.tv_usec/100;
It should use kvm_getproc2() + kinfo_proc2 which are the compatible
interface. Apps that use kp_proc will break often.
Andrew