More changes for providing lwpid for ktrace (sparc GENERIC built)
This commit is contained in:
parent
0a144cd97c
commit
6147cc4ab2
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: cgeight.c,v 1.32 2003/04/02 04:35:26 thorpej Exp $ */
|
||||
/* $NetBSD: cgeight.c,v 1.33 2003/06/29 09:56:24 darrenr Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1996, 1997 The NetBSD Foundation, Inc.
|
||||
|
@ -315,10 +315,10 @@ cgeightattach(parent, self, aux)
|
|||
}
|
||||
|
||||
int
|
||||
cgeightopen(dev, flags, mode, p)
|
||||
cgeightopen(dev, flags, mode, l)
|
||||
dev_t dev;
|
||||
int flags, mode;
|
||||
struct proc *p;
|
||||
struct lwp *l;
|
||||
{
|
||||
int unit = minor(dev);
|
||||
|
||||
|
@ -328,12 +328,12 @@ cgeightopen(dev, flags, mode, p)
|
|||
}
|
||||
|
||||
int
|
||||
cgeightioctl(dev, cmd, data, flags, p)
|
||||
cgeightioctl(dev, cmd, data, flags, l)
|
||||
dev_t dev;
|
||||
u_long cmd;
|
||||
caddr_t data;
|
||||
int flags;
|
||||
struct proc *p;
|
||||
struct lwp *l;
|
||||
{
|
||||
#if defined(SUN4)
|
||||
struct cgeight_softc *sc = cgeight_cd.cd_devs[minor(dev)];
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: cgfour.c,v 1.31 2002/10/23 09:12:06 jdolecek Exp $ */
|
||||
/* $NetBSD: cgfour.c,v 1.32 2003/06/29 09:56:24 darrenr Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1996, 1997 The NetBSD Foundation, Inc.
|
||||
|
@ -311,10 +311,10 @@ cgfourattach(parent, self, aux)
|
|||
}
|
||||
|
||||
int
|
||||
cgfouropen(dev, flags, mode, p)
|
||||
cgfouropen(dev, flags, mode, l)
|
||||
dev_t dev;
|
||||
int flags, mode;
|
||||
struct proc *p;
|
||||
struct lwp *l;
|
||||
{
|
||||
int unit = minor(dev);
|
||||
|
||||
|
@ -324,12 +324,12 @@ cgfouropen(dev, flags, mode, p)
|
|||
}
|
||||
|
||||
int
|
||||
cgfourioctl(dev, cmd, data, flags, p)
|
||||
cgfourioctl(dev, cmd, data, flags, l)
|
||||
dev_t dev;
|
||||
u_long cmd;
|
||||
caddr_t data;
|
||||
int flags;
|
||||
struct proc *p;
|
||||
struct lwp *l;
|
||||
{
|
||||
#if defined(SUN4)
|
||||
struct cgfour_softc *sc = cgfour_cd.cd_devs[minor(dev)];
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: cgfourteen.c,v 1.32 2003/04/02 04:35:27 thorpej Exp $ */
|
||||
/* $NetBSD: cgfourteen.c,v 1.33 2003/06/29 09:56:24 darrenr Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1996
|
||||
|
@ -315,10 +315,10 @@ cgfourteenattach(parent, self, aux)
|
|||
static int cg14_opens = 0;
|
||||
|
||||
int
|
||||
cgfourteenopen(dev, flags, mode, p)
|
||||
cgfourteenopen(dev, flags, mode, l)
|
||||
dev_t dev;
|
||||
int flags, mode;
|
||||
struct proc *p;
|
||||
struct lwp *l;
|
||||
{
|
||||
struct cgfourteen_softc *sc = cgfourteen_cd.cd_devs[minor(dev)];
|
||||
int unit = minor(dev);
|
||||
|
@ -340,10 +340,10 @@ cgfourteenopen(dev, flags, mode, p)
|
|||
}
|
||||
|
||||
int
|
||||
cgfourteenclose(dev, flags, mode, p)
|
||||
cgfourteenclose(dev, flags, mode, l)
|
||||
dev_t dev;
|
||||
int flags, mode;
|
||||
struct proc *p;
|
||||
struct lwp *l;
|
||||
{
|
||||
struct cgfourteen_softc *sc = cgfourteen_cd.cd_devs[minor(dev)];
|
||||
int s, opens;
|
||||
|
@ -364,12 +364,12 @@ cgfourteenclose(dev, flags, mode, p)
|
|||
}
|
||||
|
||||
int
|
||||
cgfourteenioctl(dev, cmd, data, flags, p)
|
||||
cgfourteenioctl(dev, cmd, data, flags, l)
|
||||
dev_t dev;
|
||||
u_long cmd;
|
||||
caddr_t data;
|
||||
int flags;
|
||||
struct proc *p;
|
||||
struct lwp *l;
|
||||
{
|
||||
struct cgfourteen_softc *sc = cgfourteen_cd.cd_devs[minor(dev)];
|
||||
struct fbgattr *fba;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: cgtwo.c,v 1.43 2003/04/02 04:35:27 thorpej Exp $ */
|
||||
/* $NetBSD: cgtwo.c,v 1.44 2003/06/29 09:56:24 darrenr Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1992, 1993
|
||||
|
@ -227,10 +227,10 @@ cgtwoattach(parent, self, aux)
|
|||
}
|
||||
|
||||
int
|
||||
cgtwoopen(dev, flags, mode, p)
|
||||
cgtwoopen(dev, flags, mode, l)
|
||||
dev_t dev;
|
||||
int flags, mode;
|
||||
struct proc *p;
|
||||
struct lwp *l;
|
||||
{
|
||||
int unit = minor(dev);
|
||||
|
||||
|
@ -240,12 +240,12 @@ cgtwoopen(dev, flags, mode, p)
|
|||
}
|
||||
|
||||
int
|
||||
cgtwoioctl(dev, cmd, data, flags, p)
|
||||
cgtwoioctl(dev, cmd, data, flags, l)
|
||||
dev_t dev;
|
||||
u_long cmd;
|
||||
register caddr_t data;
|
||||
int flags;
|
||||
struct proc *p;
|
||||
struct lwp *l;
|
||||
{
|
||||
register struct cgtwo_softc *sc = cgtwo_cd.cd_devs[minor(dev)];
|
||||
register struct fbgattr *fba;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: fd.c,v 1.107 2003/06/18 08:58:41 drochner Exp $ */
|
||||
/* $NetBSD: fd.c,v 1.108 2003/06/29 09:56:25 darrenr Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2000 The NetBSD Foundation, Inc.
|
||||
|
@ -1063,10 +1063,10 @@ fdc_wrfifo(fdc, x)
|
|||
}
|
||||
|
||||
int
|
||||
fdopen(dev, flags, fmt, p)
|
||||
fdopen(dev, flags, fmt, l)
|
||||
dev_t dev;
|
||||
int flags, fmt;
|
||||
struct proc *p;
|
||||
struct lwp *l;
|
||||
{
|
||||
int unit, pmask;
|
||||
struct fd_softc *fd;
|
||||
|
@ -1114,10 +1114,10 @@ fdopen(dev, flags, fmt, p)
|
|||
}
|
||||
|
||||
int
|
||||
fdclose(dev, flags, fmt, p)
|
||||
fdclose(dev, flags, fmt, l)
|
||||
dev_t dev;
|
||||
int flags, fmt;
|
||||
struct proc *p;
|
||||
struct lwp *l;
|
||||
{
|
||||
struct fd_softc *fd = fd_cd.cd_devs[FDUNIT(dev)];
|
||||
int pmask = (1 << DISKPART(dev));
|
||||
|
@ -1863,12 +1863,12 @@ fdcretry(fdc)
|
|||
}
|
||||
|
||||
int
|
||||
fdioctl(dev, cmd, addr, flag, p)
|
||||
fdioctl(dev, cmd, addr, flag, l)
|
||||
dev_t dev;
|
||||
u_long cmd;
|
||||
caddr_t addr;
|
||||
int flag;
|
||||
struct proc *p;
|
||||
struct lwp *l;
|
||||
{
|
||||
struct fd_softc *fd;
|
||||
struct fdc_softc *fdc;
|
||||
|
@ -2051,7 +2051,7 @@ fdioctl(dev, cmd, addr, flag, p)
|
|||
fd_formb->fd_formb_secsize(i) = fd->sc_type->secsize;
|
||||
}
|
||||
|
||||
error = fdformat(dev, fd_formb, p);
|
||||
error = fdformat(dev, fd_formb, l->l_proc);
|
||||
free(fd_formb, M_TEMP);
|
||||
return error;
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: kd.c,v 1.23 2002/10/23 09:12:09 jdolecek Exp $ */
|
||||
/* $NetBSD: kd.c,v 1.24 2003/06/29 09:56:25 darrenr Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1996 The NetBSD Foundation, Inc.
|
||||
|
@ -190,10 +190,10 @@ kdtty(dev)
|
|||
}
|
||||
|
||||
int
|
||||
kdopen(dev, flag, mode, p)
|
||||
kdopen(dev, flag, mode, l)
|
||||
dev_t dev;
|
||||
int flag, mode;
|
||||
struct proc *p;
|
||||
struct lwp *l;
|
||||
{
|
||||
struct kd_softc *kd;
|
||||
int error, s, unit;
|
||||
|
@ -215,7 +215,7 @@ static int firstopen = 1;
|
|||
/* It's simpler to do this up here. */
|
||||
if (((tp->t_state & (TS_ISOPEN | TS_XCLUDE))
|
||||
== (TS_ISOPEN | TS_XCLUDE))
|
||||
&& (p->p_ucred->cr_uid != 0) )
|
||||
&& (l->l_proc->p_ucred->cr_uid != 0) )
|
||||
{
|
||||
return (EBUSY);
|
||||
}
|
||||
|
@ -252,10 +252,10 @@ static int firstopen = 1;
|
|||
}
|
||||
|
||||
int
|
||||
kdclose(dev, flag, mode, p)
|
||||
kdclose(dev, flag, mode, l)
|
||||
dev_t dev;
|
||||
int flag, mode;
|
||||
struct proc *p;
|
||||
struct lwp *l;
|
||||
{
|
||||
struct kd_softc *kd;
|
||||
struct tty *tp;
|
||||
|
@ -308,10 +308,10 @@ kdwrite(dev, uio, flag)
|
|||
}
|
||||
|
||||
int
|
||||
kdpoll(dev, events, p)
|
||||
kdpoll(dev, events, l)
|
||||
dev_t dev;
|
||||
int events;
|
||||
struct proc *p;
|
||||
struct lwp *l;
|
||||
{
|
||||
struct kd_softc *kd;
|
||||
struct tty *tp;
|
||||
|
@ -319,16 +319,16 @@ kdpoll(dev, events, p)
|
|||
kd = &kd_softc; /* XXX */
|
||||
tp = kd->kd_tty;
|
||||
|
||||
return ((*tp->t_linesw->l_poll)(tp, events, p));
|
||||
return ((*tp->t_linesw->l_poll)(tp, events, l));
|
||||
}
|
||||
|
||||
int
|
||||
kdioctl(dev, cmd, data, flag, p)
|
||||
kdioctl(dev, cmd, data, flag, l)
|
||||
dev_t dev;
|
||||
u_long cmd;
|
||||
caddr_t data;
|
||||
int flag;
|
||||
struct proc *p;
|
||||
struct lwp *l;
|
||||
{
|
||||
struct kd_softc *kd;
|
||||
struct tty *tp;
|
||||
|
@ -337,11 +337,11 @@ kdioctl(dev, cmd, data, flag, p)
|
|||
kd = &kd_softc; /* XXX */
|
||||
tp = kd->kd_tty;
|
||||
|
||||
error = (*tp->t_linesw->l_ioctl)(tp, cmd, data, flag, p);
|
||||
error = (*tp->t_linesw->l_ioctl)(tp, cmd, data, flag, l);
|
||||
if (error != EPASSTHROUGH)
|
||||
return error;
|
||||
|
||||
error = ttioctl(tp, cmd, data, flag, p);
|
||||
error = ttioctl(tp, cmd, data, flag, l);
|
||||
if (error != EPASSTHROUGH)
|
||||
return error;
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: tctrl.c,v 1.22 2002/12/10 13:44:50 pk Exp $ */
|
||||
/* $NetBSD: tctrl.c,v 1.23 2003/06/29 09:56:25 darrenr Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1998 The NetBSD Foundation, Inc.
|
||||
|
@ -897,10 +897,10 @@ tctrl_write(sc, off, v)
|
|||
}
|
||||
|
||||
int
|
||||
tctrlopen(dev, flags, mode, p)
|
||||
tctrlopen(dev, flags, mode, l)
|
||||
dev_t dev;
|
||||
int flags, mode;
|
||||
struct proc *p;
|
||||
struct lwp *l;
|
||||
{
|
||||
int unit = (minor(dev)&0xf0);
|
||||
int ctl = (minor(dev)&0x0f);
|
||||
|
@ -931,10 +931,10 @@ tctrlopen(dev, flags, mode, p)
|
|||
}
|
||||
|
||||
int
|
||||
tctrlclose(dev, flags, mode, p)
|
||||
tctrlclose(dev, flags, mode, l)
|
||||
dev_t dev;
|
||||
int flags, mode;
|
||||
struct proc *p;
|
||||
struct lwp *l;
|
||||
{
|
||||
int ctl = (minor(dev)&0x0f);
|
||||
struct tctrl_softc *sc;
|
||||
|
@ -954,13 +954,14 @@ tctrlclose(dev, flags, mode, p)
|
|||
}
|
||||
|
||||
int
|
||||
tctrlioctl(dev, cmd, data, flags, p)
|
||||
tctrlioctl(dev, cmd, data, flags, l)
|
||||
dev_t dev;
|
||||
u_long cmd;
|
||||
caddr_t data;
|
||||
int flags;
|
||||
struct proc *p;
|
||||
struct lwp *l;
|
||||
{
|
||||
struct proc *p = l->l_proc;
|
||||
struct tctrl_req req, *reqn;
|
||||
struct tctrl_pwr *pwrreq;
|
||||
envsys_range_t *envrange;
|
||||
|
@ -1194,10 +1195,10 @@ tctrlioctl(dev, cmd, data, flags, p)
|
|||
}
|
||||
|
||||
int
|
||||
tctrlpoll(dev, events, p)
|
||||
tctrlpoll(dev, events, l)
|
||||
dev_t dev;
|
||||
int events;
|
||||
struct proc *p;
|
||||
struct lwp *l;
|
||||
{
|
||||
struct tctrl_softc *sc = tctrl_cd.cd_devs[TCTRL_STD_DEV];
|
||||
int revents = 0;
|
||||
|
@ -1206,7 +1207,7 @@ tctrlpoll(dev, events, p)
|
|||
if (sc->sc_event_count)
|
||||
revents |= events & (POLLIN | POLLRDNORM);
|
||||
else
|
||||
selrecord(p, &sc->sc_rsel);
|
||||
selrecord(l, &sc->sc_rsel);
|
||||
}
|
||||
|
||||
return (revents);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: machdep.c,v 1.226 2003/06/28 14:21:07 darrenr Exp $ */
|
||||
/* $NetBSD: machdep.c,v 1.227 2003/06/29 09:56:26 darrenr Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
|
||||
|
@ -466,14 +466,14 @@ struct sigframe {
|
|||
* 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;
|
||||
{
|
||||
char *cp;
|
||||
struct btinfo_kernelfile *bi_file;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: openprom.c,v 1.14 2002/10/23 09:12:12 jdolecek Exp $ */
|
||||
/* $NetBSD: openprom.c,v 1.15 2003/06/29 09:56:26 darrenr Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1992, 1993
|
||||
|
@ -74,10 +74,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)
|
||||
|
@ -122,12 +122,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;
|
||||
|
|
Loading…
Reference in New Issue