Do previous slightly differently - just pass a struct lwp * and derive the
struct proc *. OK'd by Jaromir.
This commit is contained in:
parent
bc3a6f3810
commit
685703c354
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: procfs.h,v 1.54 2004/08/21 15:59:32 jdolecek Exp $ */
|
||||
/* $NetBSD: procfs.h,v 1.55 2004/08/27 07:02:45 skrll Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1993
|
||||
|
@ -185,7 +185,7 @@ int procfs_domem __P((struct proc *, struct proc *, struct pfsnode *,
|
|||
struct uio *));
|
||||
int procfs_doctl __P((struct proc *, struct lwp *, struct pfsnode *,
|
||||
struct uio *));
|
||||
int procfs_do_pid_stat __P((struct proc *, struct proc *, struct lwp *, struct pfsnode *,
|
||||
int procfs_do_pid_stat __P((struct proc *, struct lwp *, struct pfsnode *,
|
||||
struct uio *));
|
||||
int procfs_dostatus __P((struct proc *, struct lwp *, struct pfsnode *,
|
||||
struct uio *));
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: procfs_linux.c,v 1.17 2004/08/21 15:59:32 jdolecek Exp $ */
|
||||
/* $NetBSD: procfs_linux.c,v 1.18 2004/08/27 07:02:45 skrll Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2001 Wasabi Systems, Inc.
|
||||
|
@ -36,7 +36,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: procfs_linux.c,v 1.17 2004/08/21 15:59:32 jdolecek Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: procfs_linux.c,v 1.18 2004/08/27 07:02:45 skrll Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
|
@ -110,11 +110,12 @@ procfs_domeminfo(struct proc *curp, struct proc *p, struct pfsnode *pfs,
|
|||
* mountflag is used.
|
||||
*/
|
||||
int
|
||||
procfs_do_pid_stat(struct proc *curp, struct proc *p, struct lwp *l, struct pfsnode *pfs,
|
||||
procfs_do_pid_stat(struct proc *curp, struct lwp *l, struct pfsnode *pfs,
|
||||
struct uio *uio)
|
||||
{
|
||||
char buf[512];
|
||||
int len;
|
||||
struct proc *p = l->l_proc;
|
||||
struct tty *tty = p->p_session->s_ttyp;
|
||||
struct rusage *ru = &p->p_stats->p_ru;
|
||||
struct rusage *cru = &p->p_stats->p_cru;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: procfs_subr.c,v 1.60 2004/08/21 15:59:32 jdolecek Exp $ */
|
||||
/* $NetBSD: procfs_subr.c,v 1.61 2004/08/27 07:02:45 skrll Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1993
|
||||
|
@ -73,7 +73,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: procfs_subr.c,v 1.60 2004/08/21 15:59:32 jdolecek Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: procfs_subr.c,v 1.61 2004/08/27 07:02:45 skrll Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
|
@ -336,7 +336,7 @@ procfs_rw(v)
|
|||
return (procfs_dostatus(curp, l, pfs, uio));
|
||||
|
||||
case PFSstat:
|
||||
return (procfs_do_pid_stat(curp, p, l, pfs, uio));
|
||||
return (procfs_do_pid_stat(curp, l, pfs, uio));
|
||||
|
||||
case PFSmap:
|
||||
return (procfs_domap(curp, p, pfs, uio, 0));
|
||||
|
|
Loading…
Reference in New Issue