diff options
author | yar <yar@FreeBSD.org> | 2006-07-25 22:39:57 +0000 |
---|---|---|
committer | yar <yar@FreeBSD.org> | 2006-07-25 22:39:57 +0000 |
commit | 89f0368396d9be966bb91608f912e1aa2b2f1ddb (patch) | |
tree | 01d96141500a3b9c349e5cb9c45b3b9867c1e9e2 /lib/libkvm/kvm_proc.c | |
parent | 80e8ac2fbce049780719a4be4aa0734e70e5a5ad (diff) | |
download | FreeBSD-src-89f0368396d9be966bb91608f912e1aa2b2f1ddb.zip FreeBSD-src-89f0368396d9be966bb91608f912e1aa2b2f1ddb.tar.gz |
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)
Diffstat (limited to 'lib/libkvm/kvm_proc.c')
-rw-r--r-- | lib/libkvm/kvm_proc.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/libkvm/kvm_proc.c b/lib/libkvm/kvm_proc.c index 250cb44..acf040c 100644 --- a/lib/libkvm/kvm_proc.c +++ b/lib/libkvm/kvm_proc.c @@ -374,6 +374,13 @@ nopgrp: 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; |