diff options
| author | Pawel Jakub Dawidek <pjd@FreeBSD.org> | 2004-07-29 20:27:59 +0000 |
|---|---|---|
| committer | Pawel Jakub Dawidek <pjd@FreeBSD.org> | 2004-07-29 20:27:59 +0000 |
| commit | cebabef04f95781e53c6de1d2ce0f2e0e41d0003 (patch) | |
| tree | 85e361650295da657bafd41bfd3274b7da079092 | |
| parent | 4529da5f33df2f4ac17a711eff60e0be74af3de8 (diff) | |
Notes
| -rw-r--r-- | sys/kern/kern_proc.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/sys/kern/kern_proc.c b/sys/kern/kern_proc.c index 5357d6582230..a83b9e19557c 100644 --- a/sys/kern/kern_proc.c +++ b/sys/kern/kern_proc.c @@ -702,6 +702,12 @@ fill_kinfo_thread(struct thread *td, struct kinfo_proc *kp) kp->ki_childtime = kp->ki_childstime; timevaladd(&kp->ki_childtime, &kp->ki_childutime); } + kp->ki_sflag = p->p_sflag; + kp->ki_swtime = p->p_swtime; + kp->ki_pid = p->p_pid; + kp->ki_nice = p->p_nice; + bintime2timeval(&p->p_runtime, &tv); + kp->ki_runtime = tv.tv_sec * (u_int64_t)1000000 + tv.tv_usec; if (p->p_state != PRS_ZOMBIE) { #if 0 if (td == NULL) { @@ -740,15 +746,8 @@ fill_kinfo_thread(struct thread *td, struct kinfo_proc *kp) kp->ki_stat = SIDL; } - kp->ki_sflag = p->p_sflag; - kp->ki_swtime = p->p_swtime; - kp->ki_pid = p->p_pid; - kp->ki_nice = p->p_nice; kg = td->td_ksegrp; ke = td->td_kse; - bintime2timeval(&p->p_runtime, &tv); - kp->ki_runtime = - tv.tv_sec * (u_int64_t)1000000 + tv.tv_usec; /* things in the KSE GROUP */ kp->ki_estcpu = kg->kg_estcpu; |
