Rev. 1.44 of this file didn't introduce a right solution,

but we don't seem to have one yet, so just add an XXX comment on
passing rux_runtime to bintime2timeval() wrongly.

Spotted by:	gcc(1) (warning)
This commit is contained in:
Yaroslav Tykhiy 2006-07-25 22:39:57 +00:00
parent 93e3b716ba
commit 42e4359156

View File

@ -374,6 +374,13 @@ kvm_proclist(kd, what, arg, p, bp, maxcnt)
kp->ki_lockname, LOCKNAMELEN);
kp->ki_lockname[LOCKNAMELEN] = 0;
}
/*
* XXX: This is plain wrong, rux_runtime has nothing
* to do with struct bintime, rux_runtime is just a 64-bit
* integer counter of cputicks. What we need here is a way
* to convert cputicks to usecs. The kernel does it in
* kern/kern_tc.c, but the function can't be just copied.
*/
bintime2timeval(&proc.p_rux.rux_runtime, &tv);
kp->ki_runtime = (u_int64_t)tv.tv_sec * 1000000 + tv.tv_usec;
kp->ki_pid = proc.p_pid;