add definition for ability to produce a backtrace
[unix-history] / usr / src / sys / kern / uipc_usrreq.c
index 89517b5..e9ab81d 100644 (file)
@@ -2,7 +2,7 @@
  *
  * %sccs.include.redist.c%
  *
  *
  * %sccs.include.redist.c%
  *
- *     @(#)uipc_usrreq.c       8.6 (Berkeley) %G%
+ *     @(#)uipc_usrreq.c       8.9 (Berkeley) %G%
  */
 
 #include <sys/param.h>
  */
 
 #include <sys/param.h>
@@ -33,6 +33,7 @@ struct        sockaddr sun_noname = { sizeof(sun_noname), AF_UNIX };
 ino_t  unp_ino;                        /* prototype for fake inode numbers */
 
 /*ARGSUSED*/
 ino_t  unp_ino;                        /* prototype for fake inode numbers */
 
 /*ARGSUSED*/
+int
 uipc_usrreq(so, req, m, nam, control)
        struct socket *so;
        int req;
 uipc_usrreq(so, req, m, nam, control)
        struct socket *so;
        int req;
@@ -285,6 +286,7 @@ u_long      unpdg_recvspace = 4*1024;
 
 int    unp_rights;                     /* file descriptors in flight */
 
 
 int    unp_rights;                     /* file descriptors in flight */
 
+int
 unp_attach(so)
        struct socket *so;
 {
 unp_attach(so)
        struct socket *so;
 {
@@ -318,6 +320,7 @@ unp_attach(so)
        return (0);
 }
 
        return (0);
 }
 
+void
 unp_detach(unp)
        register struct unpcb *unp;
 {
 unp_detach(unp)
        register struct unpcb *unp;
 {
@@ -348,6 +351,7 @@ unp_detach(unp)
        }
 }
 
        }
 }
 
+int
 unp_bind(unp, nam, p)
        struct unpcb *unp;
        struct mbuf *nam;
 unp_bind(unp, nam, p)
        struct unpcb *unp;
        struct mbuf *nam;
@@ -360,7 +364,7 @@ unp_bind(unp, nam, p)
        struct nameidata nd;
 
        NDINIT(&nd, CREATE, FOLLOW | LOCKPARENT, UIO_SYSSPACE,
        struct nameidata nd;
 
        NDINIT(&nd, CREATE, FOLLOW | LOCKPARENT, UIO_SYSSPACE,
-               soun->sun_path, p);
+           soun->sun_path, p);
        if (unp->unp_vnode != NULL)
                return (EINVAL);
        if (nam->m_len == MLEN) {
        if (unp->unp_vnode != NULL)
                return (EINVAL);
        if (nam->m_len == MLEN) {
@@ -391,10 +395,11 @@ unp_bind(unp, nam, p)
        vp->v_socket = unp->unp_socket;
        unp->unp_vnode = vp;
        unp->unp_addr = m_copy(nam, 0, (int)M_COPYALL);
        vp->v_socket = unp->unp_socket;
        unp->unp_vnode = vp;
        unp->unp_addr = m_copy(nam, 0, (int)M_COPYALL);
-       VOP_UNLOCK(vp);
+       VOP_UNLOCK(vp, 0, p);
        return (0);
 }
 
        return (0);
 }
 
+int
 unp_connect(so, nam, p)
        struct socket *so;
        struct mbuf *nam;
 unp_connect(so, nam, p)
        struct socket *so;
        struct mbuf *nam;
@@ -450,6 +455,7 @@ bad:
        return (error);
 }
 
        return (error);
 }
 
+int
 unp_connect2(so, so2)
        register struct socket *so;
        register struct socket *so2;
 unp_connect2(so, so2)
        register struct socket *so;
        register struct socket *so2;
@@ -519,6 +525,7 @@ unp_disconnect(unp)
 }
 
 #ifdef notdef
 }
 
 #ifdef notdef
+void
 unp_abort(unp)
        struct unpcb *unp;
 {
 unp_abort(unp)
        struct unpcb *unp;
 {
@@ -562,6 +569,7 @@ unp_drain()
 }
 #endif
 
 }
 #endif
 
+int
 unp_externalize(rights)
        struct mbuf *rights;
 {
 unp_externalize(rights)
        struct mbuf *rights;
 {
@@ -593,6 +601,7 @@ unp_externalize(rights)
        return (0);
 }
 
        return (0);
 }
 
+int
 unp_internalize(control, p)
        struct mbuf *control;
        struct proc *p;
 unp_internalize(control, p)
        struct mbuf *control;
        struct proc *p;
@@ -736,7 +745,7 @@ unp_gc()
        for (i = nunref, fpp = extra_ref; --i >= 0; ++fpp)
                sorflush((struct socket *)(*fpp)->f_data);
        for (i = nunref, fpp = extra_ref; --i >= 0; ++fpp)
        for (i = nunref, fpp = extra_ref; --i >= 0; ++fpp)
                sorflush((struct socket *)(*fpp)->f_data);
        for (i = nunref, fpp = extra_ref; --i >= 0; ++fpp)
-               closef(*fpp);
+               closef(*fpp, (struct proc *)NULL);
        free((caddr_t)extra_ref, M_FILE);
        unp_gcing = 0;
 }
        free((caddr_t)extra_ref, M_FILE);
        unp_gcing = 0;
 }
@@ -753,7 +762,7 @@ unp_dispose(m)
 void
 unp_scan(m0, op)
        register struct mbuf *m0;
 void
 unp_scan(m0, op)
        register struct mbuf *m0;
-       void (*op)();
+       void (*op) __P((struct file *));
 {
        register struct mbuf *m;
        register struct file **rp;
 {
        register struct mbuf *m;
        register struct file **rp;