diff options
author | julian <julian@FreeBSD.org> | 2001-09-12 08:38:13 +0000 |
---|---|---|
committer | julian <julian@FreeBSD.org> | 2001-09-12 08:38:13 +0000 |
commit | 5596676e6c6c1e81e899cd0531f9b1c28a292669 (patch) | |
tree | b1a19fcdf05759281fab0d89efb13f0fdf42102e /sys/net/ppp_tty.c | |
parent | 83e00d4274950d2b531c24692cd123538ffbddb9 (diff) | |
download | FreeBSD-src-5596676e6c6c1e81e899cd0531f9b1c28a292669.zip FreeBSD-src-5596676e6c6c1e81e899cd0531f9b1c28a292669.tar.gz |
KSE Milestone 2
Note ALL MODULES MUST BE RECOMPILED
make the kernel aware that there are smaller units of scheduling than the
process. (but only allow one thread per process at this time).
This is functionally equivalent to teh previousl -current except
that there is a thread associated with each process.
Sorry john! (your next MFC will be a doosie!)
Reviewed by: peter@freebsd.org, dillon@freebsd.org
X-MFC after: ha ha ha ha
Diffstat (limited to 'sys/net/ppp_tty.c')
-rw-r--r-- | sys/net/ppp_tty.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/sys/net/ppp_tty.c b/sys/net/ppp_tty.c index 3a95fdb..635e7ad 100644 --- a/sys/net/ppp_tty.c +++ b/sys/net/ppp_tty.c @@ -98,8 +98,8 @@ static int pppopen __P((dev_t dev, struct tty *tp)); static int pppclose __P((struct tty *tp, int flag)); static int pppread __P((struct tty *tp, struct uio *uio, int flag)); static int pppwrite __P((struct tty *tp, struct uio *uio, int flag)); -static int ppptioctl __P((struct tty *tp, u_long cmd, caddr_t data, int flag, - struct proc *)); +static int ppptioctl __P((struct tty *tp, u_long cmd, caddr_t data, + int flag, struct thread *td)); static int pppinput __P((int c, struct tty *tp)); static int pppstart __P((struct tty *tp)); @@ -171,11 +171,11 @@ pppopen(dev, tp) dev_t dev; register struct tty *tp; { - struct proc *p = curproc; /* XXX */ + struct thread *td = curthread; /* XXX */ register struct ppp_softc *sc; int error, s; - if ((error = suser(p)) != 0) + if ((error = suser_td(td)) != 0) return (error); s = spltty(); @@ -188,7 +188,7 @@ pppopen(dev, tp) } } - if ((sc = pppalloc(p->p_pid)) == NULL) { + if ((sc = pppalloc(td->td_proc->p_pid)) == NULL) { splx(s); return ENXIO; } @@ -428,12 +428,12 @@ pppwrite(tp, uio, flag) */ /* ARGSUSED */ static int -ppptioctl(tp, cmd, data, flag, p) +ppptioctl(tp, cmd, data, flag, td) struct tty *tp; u_long cmd; caddr_t data; int flag; - struct proc *p; + struct thread *td; { struct ppp_softc *sc = (struct ppp_softc *) tp->t_sc; int error, s; @@ -444,7 +444,7 @@ ppptioctl(tp, cmd, data, flag, p) error = 0; switch (cmd) { case PPPIOCSASYNCMAP: - if ((error = suser(p)) != 0) + if ((error = suser_td(td)) != 0) break; sc->sc_asyncmap[0] = *(u_int *)data; break; @@ -454,7 +454,7 @@ ppptioctl(tp, cmd, data, flag, p) break; case PPPIOCSRASYNCMAP: - if ((error = suser(p)) != 0) + if ((error = suser_td(td)) != 0) break; sc->sc_rasyncmap = *(u_int *)data; break; @@ -464,7 +464,7 @@ ppptioctl(tp, cmd, data, flag, p) break; case PPPIOCSXASYNCMAP: - if ((error = suser(p)) != 0) + if ((error = suser_td(td)) != 0) break; s = spltty(); bcopy(data, sc->sc_asyncmap, sizeof(sc->sc_asyncmap)); @@ -479,7 +479,7 @@ ppptioctl(tp, cmd, data, flag, p) break; default: - error = pppioctl(sc, cmd, data, flag, p); + error = pppioctl(sc, cmd, data, flag, td); if (error == 0 && cmd == PPPIOCSMRU) pppgetm(sc); } |