[BACK]Return to uipc_socket.c CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / sys / kern

Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.

Diff for /src/sys/kern/uipc_socket.c between version 1.36 and 1.37

version 1.36, 1998/07/31 22:50:52 version 1.37, 1998/08/02 04:53:12
Line 50 
Line 50 
 #include <sys/socketvar.h>  #include <sys/socketvar.h>
 #include <sys/signalvar.h>  #include <sys/signalvar.h>
 #include <sys/resourcevar.h>  #include <sys/resourcevar.h>
   #include <sys/pool.h>
   
   struct pool socket_pool;
   
   void
   soinit()
   {
   
           pool_init(&socket_pool, sizeof(struct socket), 0, 0, 0,
               "sockpl", 0, NULL, NULL, M_SOCKET);
   }
   
 /*  /*
  * Socket operation routines.   * Socket operation routines.
Line 79  socreate(dom, aso, type, proto)
Line 90  socreate(dom, aso, type, proto)
                 return (EPROTONOSUPPORT);                  return (EPROTONOSUPPORT);
         if (prp->pr_type != type)          if (prp->pr_type != type)
                 return (EPROTOTYPE);                  return (EPROTOTYPE);
         MALLOC(so, struct socket *, sizeof(*so), M_SOCKET, M_WAIT);          so = pool_get(&socket_pool, PR_WAITOK);
         bzero((caddr_t)so, sizeof(*so));          bzero((caddr_t)so, sizeof(*so));
         TAILQ_INIT(&so->so_q0);          TAILQ_INIT(&so->so_q0);
         TAILQ_INIT(&so->so_q);          TAILQ_INIT(&so->so_q);
Line 156  sofree(so)
Line 167  sofree(so)
         }          }
         sbrelease(&so->so_snd);          sbrelease(&so->so_snd);
         sorflush(so);          sorflush(so);
         FREE(so, M_SOCKET);          pool_put(&socket_pool, so);
 }  }
   
 /*  /*

Legend:
Removed from v.1.36  
changed lines
  Added in v.1.37

CVSweb <webmaster@jp.NetBSD.org>