summaryrefslogtreecommitdiffstats
path: root/sys/net/if_tap.c
diff options
context:
space:
mode:
authorjulian <julian@FreeBSD.org>2001-09-12 08:38:13 +0000
committerjulian <julian@FreeBSD.org>2001-09-12 08:38:13 +0000
commit5596676e6c6c1e81e899cd0531f9b1c28a292669 (patch)
treeb1a19fcdf05759281fab0d89efb13f0fdf42102e /sys/net/if_tap.c
parent83e00d4274950d2b531c24692cd123538ffbddb9 (diff)
downloadFreeBSD-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/if_tap.c')
-rw-r--r--sys/net/if_tap.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/sys/net/if_tap.c b/sys/net/if_tap.c
index 6e60b5b..f41fbd3 100644
--- a/sys/net/if_tap.c
+++ b/sys/net/if_tap.c
@@ -389,17 +389,17 @@ tapcreate(dev)
* to open tunnel. must be superuser
*/
static int
-tapopen(dev, flag, mode, p)
+tapopen(dev, flag, mode, td)
dev_t dev;
int flag;
int mode;
- struct proc *p;
+ struct thread *td;
{
struct tap_softc *tp = NULL;
int unit, error;
struct resource *r = NULL;
- if ((error = suser(p)) != 0)
+ if ((error = suser_td(td)) != 0)
return (error);
unit = dev2unit(dev) & TAPMAXUNIT;
@@ -428,7 +428,7 @@ tapopen(dev, flag, mode, p)
bcopy(tp->arpcom.ac_enaddr, tp->ether_addr, sizeof(tp->ether_addr));
tp->tap_unit = r;
- tp->tap_pid = p->p_pid;
+ tp->tap_pid = td->td_proc->p_pid;
tp->tap_flags |= TAP_OPEN;
TAPDEBUG("%s%d is open. minor = %#x\n",
@@ -444,11 +444,11 @@ tapopen(dev, flag, mode, p)
* close the device - mark i/f down & delete routing info
*/
static int
-tapclose(dev, foo, bar, p)
+tapclose(dev, foo, bar, td)
dev_t dev;
int foo;
int bar;
- struct proc *p;
+ struct thread *td;
{
int s, error;
struct tap_softc *tp = dev->si_drv1;
@@ -643,12 +643,12 @@ tapifstart(ifp)
* the cdevsw interface is now pretty minimal
*/
static int
-tapioctl(dev, cmd, data, flag, p)
+tapioctl(dev, cmd, data, flag, td)
dev_t dev;
u_long cmd;
caddr_t data;
int flag;
- struct proc *p;
+ struct thread *td;
{
struct tap_softc *tp = dev->si_drv1;
struct ifnet *ifp = &tp->tap_if;
@@ -911,10 +911,10 @@ tapwrite(dev, uio, flag)
* anyway, it either accepts the packet or drops it
*/
static int
-tappoll(dev, events, p)
+tappoll(dev, events, td)
dev_t dev;
int events;
- struct proc *p;
+ struct thread *td;
{
struct tap_softc *tp = dev->si_drv1;
struct ifnet *ifp = &tp->tap_if;
@@ -935,7 +935,7 @@ tappoll(dev, events, p)
TAPDEBUG("%s%d waiting for data, minor = %#x\n",
ifp->if_name, ifp->if_unit, minor(dev));
- selrecord(p, &tp->tap_rsel);
+ selrecord(curthread, &tp->tap_rsel);
}
}
OpenPOWER on IntegriCloud