proc->thread stage 4: rework the VFS and DEVICE subsystems to take thread
[dragonfly.git] / sys / netproto / atm / atm_usrreq.c
index fadfd43..5db37df 100644 (file)
@@ -24,7 +24,7 @@
  * notice must be reproduced on all copies.
  *
  *     @(#) $FreeBSD: src/sys/netatm/atm_usrreq.c,v 1.6 1999/08/28 00:48:39 peter Exp $
- *     @(#) $DragonFly: src/sys/netproto/atm/atm_usrreq.c,v 1.2 2003/06/17 04:28:49 dillon Exp $
+ *     @(#) $DragonFly: src/sys/netproto/atm/atm_usrreq.c,v 1.3 2003/06/25 03:56:03 dillon Exp $
  */
 
 /*
@@ -40,9 +40,9 @@
 /*
  * Local functions
  */
-static int     atm_dgram_attach __P((struct socket *, int, struct proc *));
+static int     atm_dgram_attach __P((struct socket *, int, struct thread *));
 static int     atm_dgram_control __P((struct socket *, u_long, caddr_t, 
-                       struct ifnet *, struct proc *));
+                       struct ifnet *, struct thread *));
 static int     atm_dgram_info __P((caddr_t));
 
 
@@ -121,10 +121,10 @@ struct pr_usrreqs atm_dgram_usrreqs = {
  *
  */
 static int
-atm_dgram_attach(so, proto, p)
+atm_dgram_attach(so, proto, td)
        struct socket   *so;
        int             proto;
-       struct proc     *p;
+       struct thread   *td;
 {
        ATM_INTRO();
 
@@ -151,12 +151,12 @@ atm_dgram_attach(so, proto, p)
  *
  */
 static int
-atm_dgram_control(so, cmd, data, ifp, p)
+atm_dgram_control(so, cmd, data, ifp, td)
        struct socket   *so;
        u_long          cmd;
        caddr_t         data;
        struct ifnet    *ifp;
-       struct proc     *p;
+       struct thread   *td;
 {
        ATM_INTRO();
 
@@ -170,7 +170,7 @@ atm_dgram_control(so, cmd, data, ifp, p)
                struct atmcfgreq        *acp = (struct atmcfgreq *)data;
                struct atm_pif          *pip;
 
-               if (p && (suser(p) != 0))
+               if (suser(td))
                        ATM_RETERR(EPERM);
 
                switch (acp->acr_opcode) {
@@ -203,7 +203,7 @@ atm_dgram_control(so, cmd, data, ifp, p)
                struct atmaddreq        *aap = (struct atmaddreq *)data;
                Atm_endpoint            *epp;
 
-               if (p && (suser(p) != 0))
+               if (suser(td))
                        ATM_RETERR(EPERM);
 
                switch (aap->aar_opcode) {
@@ -253,7 +253,7 @@ atm_dgram_control(so, cmd, data, ifp, p)
                struct sigmgr           *smp;
                Atm_endpoint            *epp;
 
-               if (p && (suser(p) != 0))
+               if (suser(td))
                        ATM_RETERR(EPERM);
 
                switch (adp->adr_opcode) {
@@ -306,7 +306,7 @@ atm_dgram_control(so, cmd, data, ifp, p)
                struct sigmgr           *smp;
                struct ifnet            *ifp2;
 
-               if (p && (suser(p) != 0))
+               if (suser(td))
                        ATM_RETERR(EPERM);
 
                switch (asp->asr_opcode) {