diff options
author | Artur Grabowski <art@cvs.openbsd.org> | 2002-06-09 05:46:16 +0000 |
---|---|---|
committer | Artur Grabowski <art@cvs.openbsd.org> | 2002-06-09 05:46:16 +0000 |
commit | 658e48cb6a1124986afd98b5de78b829181708b4 (patch) | |
tree | 1ab6b6aecb617012295fdd0ba733839d5358d9a9 /sys/kern | |
parent | 160d36ddbe74dc6352a9a49bcf1b2e7d78f908dc (diff) |
add struct pstats to struct eproc
Diffstat (limited to 'sys/kern')
-rw-r--r-- | sys/kern/kern_sysctl.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/sys/kern/kern_sysctl.c b/sys/kern/kern_sysctl.c index 8a52dbc9ebf..6da91c97b05 100644 --- a/sys/kern/kern_sysctl.c +++ b/sys/kern/kern_sysctl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_sysctl.c,v 1.69 2002/06/09 04:27:25 angelos Exp $ */ +/* $OpenBSD: kern_sysctl.c,v 1.70 2002/06/09 05:46:15 art Exp $ */ /* $NetBSD: kern_sysctl.c,v 1.17 1996/05/20 17:49:05 mrg Exp $ */ /*- @@ -960,11 +960,9 @@ again: * Fill in an eproc structure for the specified process. */ void -fill_eproc(p, ep) - register struct proc *p; - register struct eproc *ep; +fill_eproc(struct proc *p, struct eproc *ep) { - register struct tty *tp; + struct tty *tp; ep->e_paddr = p; ep->e_sess = p->p_pgrp->pg_session; @@ -975,13 +973,19 @@ fill_eproc(p, ep) ep->e_vm.vm_tsize = 0; ep->e_vm.vm_dsize = 0; ep->e_vm.vm_ssize = 0; + bzero(&ep->e_pstats, sizeof(ep->e_pstats)); + ep->e_pstats_valid = 0; } else { - register struct vmspace *vm = p->p_vmspace; + struct vmspace *vm = p->p_vmspace; + PHOLD(p); /* need for pstats */ ep->e_vm.vm_rssize = vm_resident_count(vm); ep->e_vm.vm_tsize = vm->vm_tsize; ep->e_vm.vm_dsize = vm->vm_dsize; ep->e_vm.vm_ssize = vm->vm_ssize; + ep->e_pstats = *p->p_stats; + ep->e_pstats_valid = 1; + PRELE(p); } if (p->p_pptr) ep->e_ppid = p->p_pptr->p_pid; |