struct proc * -> struct lwp *

This commit is contained in:
martin 2003-06-29 10:37:45 +00:00
parent c101c976d0
commit 2edcbf6bb2
7 changed files with 29 additions and 32 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: machdep.c,v 1.143 2003/06/28 14:21:08 darrenr Exp $ */
/* $NetBSD: machdep.c,v 1.144 2003/06/29 10:37:45 martin Exp $ */
/*-
* Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
@ -458,14 +458,14 @@ parse_bootargs(args)
* machine dependent system variables.
*/
int
cpu_sysctl(name, namelen, oldp, oldlenp, newp, newlen, p)
cpu_sysctl(name, namelen, oldp, oldlenp, newp, newlen, l)
int *name;
u_int namelen;
void *oldp;
size_t *oldlenp;
void *newp;
size_t newlen;
struct proc *p;
struct lwp *l;
{
u_int chosen;
char bootargs[256];

View File

@ -1,4 +1,4 @@
/* $NetBSD: openprom.c,v 1.9 2003/05/17 01:38:40 nakayama Exp $ */
/* $NetBSD: openprom.c,v 1.10 2003/06/29 10:37:46 martin Exp $ */
/*
* Copyright (c) 1992, 1993
@ -76,10 +76,10 @@ static int openpromcheckid __P((int, int));
static int openpromgetstr __P((int, char *, char **));
int
openpromopen(dev, flags, mode, p)
openpromopen(dev, flags, mode, l)
dev_t dev;
int flags, mode;
struct proc *p;
struct lwp *l;
{
#if defined(SUN4)
if (cputyp==CPU_SUN4)
@ -124,12 +124,12 @@ openpromgetstr(len, user, cpp)
}
int
openpromioctl(dev, cmd, data, flags, p)
openpromioctl(dev, cmd, data, flags, l)
dev_t dev;
u_long cmd;
caddr_t data;
int flags;
struct proc *p;
struct lwp *l;
{
struct opiocdesc *op;
int node, len, ok, error, s;

View File

@ -1,4 +1,4 @@
/* $NetBSD: vm_machdep.c,v 1.47 2003/01/18 06:55:26 thorpej Exp $ */
/* $NetBSD: vm_machdep.c,v 1.48 2003/06/29 10:37:46 martin Exp $ */
/*
* Copyright (c) 1996-2002 Eduardo Horvath. All rights reserved.
@ -453,13 +453,13 @@ cpu_coredump(l, vp, cred, chdr)
cseg.c_size = chdr->c_cpusize;
error = vn_rdwr(UIO_WRITE, vp, (caddr_t)&cseg, chdr->c_seghdrsize,
(off_t)chdr->c_hdrsize, UIO_SYSSPACE,
IO_NODELOCKED|IO_UNIT, cred, NULL, l->l_proc);
IO_NODELOCKED|IO_UNIT, cred, NULL, l);
if (error)
return error;
error = vn_rdwr(UIO_WRITE, vp, (caddr_t)&md_core, sizeof(md_core),
(off_t)(chdr->c_hdrsize + chdr->c_seghdrsize), UIO_SYSSPACE,
IO_NODELOCKED|IO_UNIT, cred, NULL, l->l_proc);
IO_NODELOCKED|IO_UNIT, cred, NULL, l);
if (!error)
chdr->c_nseg++;

View File

@ -1,4 +1,4 @@
/* $NetBSD: netbsd32_compat_09.c,v 1.9 2003/01/18 08:28:25 thorpej Exp $ */
/* $NetBSD: netbsd32_compat_09.c,v 1.10 2003/06/29 10:39:51 martin Exp $ */
/*
* Copyright (c) 1998 Matthew R. Green
@ -29,7 +29,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: netbsd32_compat_09.c,v 1.9 2003/01/18 08:28:25 thorpej Exp $");
__KERNEL_RCSID(0, "$NetBSD: netbsd32_compat_09.c,v 1.10 2003/06/29 10:39:51 martin Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -54,14 +54,13 @@ compat_09_netbsd32_ogetdomainname(l, v, retval)
syscallarg(netbsd32_charp) domainname;
syscallarg(int) len;
} */ *uap = v;
struct proc *p = l->l_proc;
int name;
size_t sz;
name = KERN_DOMAINNAME;
sz = SCARG(uap, len);
return (kern_sysctl(&name, 1,
(char *)NETBSD32PTR64(SCARG(uap, domainname)), &sz, 0, 0, p));
(char *)NETBSD32PTR64(SCARG(uap, domainname)), &sz, 0, 0, l));
}
int
@ -74,15 +73,14 @@ compat_09_netbsd32_osetdomainname(l, v, retval)
syscallarg(netbsd32_charp) domainname;
syscallarg(int) len;
} */ *uap = v;
struct proc *p = l->l_proc;
int name;
int error;
if ((error = suser(p->p_ucred, &p->p_acflag)) != 0)
if ((error = suser(l->l_proc->p_ucred, &l->l_proc->p_acflag)) != 0)
return (error);
name = KERN_DOMAINNAME;
return (kern_sysctl(&name, 1, 0, 0,
(char *)NETBSD32PTR64(SCARG(uap, domainname)), SCARG(uap, len), p));
(char *)NETBSD32PTR64(SCARG(uap, domainname)), SCARG(uap, len), l));
}
int

View File

@ -1,4 +1,4 @@
/* $NetBSD: netbsd32_compat_43.c,v 1.25 2003/06/28 14:21:24 darrenr Exp $ */
/* $NetBSD: netbsd32_compat_43.c,v 1.26 2003/06/29 10:39:51 martin Exp $ */
/*
* Copyright (c) 1998, 2001 Matthew R. Green
@ -29,7 +29,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: netbsd32_compat_43.c,v 1.25 2003/06/28 14:21:24 darrenr Exp $");
__KERNEL_RCSID(0, "$NetBSD: netbsd32_compat_43.c,v 1.26 2003/06/29 10:39:51 martin Exp $");
#if defined(_KERNEL_OPT)
#include "opt_compat_43.h"
@ -327,7 +327,7 @@ compat_43_netbsd32_ogethostname(l, v, retval)
name = KERN_HOSTNAME;
sz = SCARG(uap, len);
return (kern_sysctl(&name, 1,
(char *)NETBSD32PTR64(SCARG(uap, hostname)), &sz, 0, 0, l->l_proc));
(char *)NETBSD32PTR64(SCARG(uap, hostname)), &sz, 0, 0, l));
}
int
@ -336,7 +336,6 @@ compat_43_netbsd32_osethostname(l, v, retval)
void *v;
register_t *retval;
{
struct proc *p = l->l_proc;
struct compat_43_netbsd32_osethostname_args /* {
syscallarg(netbsd32_charp) hostname;
syscallarg(u_int) len;
@ -344,11 +343,11 @@ compat_43_netbsd32_osethostname(l, v, retval)
int name;
int error;
if ((error = suser(p->p_ucred, &p->p_acflag)) != 0)
if ((error = suser(l->l_proc->p_ucred, &l->l_proc->p_acflag)) != 0)
return (error);
name = KERN_HOSTNAME;
return (kern_sysctl(&name, 1, 0, 0, (char *)NETBSD32PTR64(SCARG(uap,
hostname)), SCARG(uap, len), p));
hostname)), SCARG(uap, len), l));
}
int

View File

@ -1,4 +1,4 @@
/* $NetBSD: sunkbd.c,v 1.16 2003/01/19 16:53:53 thorpej Exp $ */
/* $NetBSD: sunkbd.c,v 1.17 2003/06/29 10:46:04 martin Exp $ */
/*
* Copyright (c) 1992, 1993
@ -55,7 +55,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: sunkbd.c,v 1.16 2003/01/19 16:53:53 thorpej Exp $");
__KERNEL_RCSID(0, "$NetBSD: sunkbd.c,v 1.17 2003/06/29 10:46:04 martin Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -212,7 +212,7 @@ sunkbdiopen(dev, flags)
{
struct kbd_sun_softc *k = (void *) dev;
struct tty *tp = (struct tty *)k->k_priv;
struct proc *p = curproc ? curproc : &proc0;
struct lwp *l = curlwp ? curlwp : &lwp0;
struct termios t;
const struct cdevsw *cdev;
int error;
@ -223,7 +223,7 @@ sunkbdiopen(dev, flags)
/* Open the lower device */
if ((error = (*cdev->d_open)(tp->t_dev, O_NONBLOCK|flags,
0/* ignored? */, p)) != 0)
0/* ignored? */, l)) != 0)
return (error);
/* Now configure it for the console. */

View File

@ -1,4 +1,4 @@
/* $NetBSD: sunms.c,v 1.14 2003/05/30 23:34:06 petrov Exp $ */
/* $NetBSD: sunms.c,v 1.15 2003/06/29 10:46:04 martin Exp $ */
/*
* Copyright (c) 1992, 1993
@ -56,7 +56,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: sunms.c,v 1.14 2003/05/30 23:34:06 petrov Exp $");
__KERNEL_RCSID(0, "$NetBSD: sunms.c,v 1.15 2003/06/29 10:46:04 martin Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -192,7 +192,7 @@ sunmsiopen(dev, flags)
{
struct ms_softc *ms = (void *) dev;
struct tty *tp = (struct tty *)ms->ms_cs;
struct proc *p = curproc ? curproc : &proc0;
struct lwp *l = curlwp ? curlwp : &lwp0;
struct termios t;
const struct cdevsw *cdev;
int error;
@ -203,7 +203,7 @@ sunmsiopen(dev, flags)
/* Open the lower device */
if ((error = (*cdev->d_open)(tp->t_dev, O_NONBLOCK|flags,
0/* ignored? */, p)) != 0)
0/* ignored? */, l)) != 0)
return (error);
/* Now configure it for the console. */