[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.110 and 1.113

version 1.110, 2005/05/07 17:42:09 version 1.113, 2005/12/08 03:13:18
Line 105  int  somaxconn = SOMAXCONN;
Line 105  int  somaxconn = SOMAXCONN;
 #ifdef SOSEND_COUNTERS  #ifdef SOSEND_COUNTERS
 #include <sys/device.h>  #include <sys/device.h>
   
 struct evcnt sosend_loan_big = EVCNT_INITIALIZER(EVCNT_TYPE_MISC,  static struct evcnt sosend_loan_big = EVCNT_INITIALIZER(EVCNT_TYPE_MISC,
     NULL, "sosend", "loan big");      NULL, "sosend", "loan big");
 struct evcnt sosend_copy_big = EVCNT_INITIALIZER(EVCNT_TYPE_MISC,  static struct evcnt sosend_copy_big = EVCNT_INITIALIZER(EVCNT_TYPE_MISC,
     NULL, "sosend", "copy big");      NULL, "sosend", "copy big");
 struct evcnt sosend_copy_small = EVCNT_INITIALIZER(EVCNT_TYPE_MISC,  static struct evcnt sosend_copy_small = EVCNT_INITIALIZER(EVCNT_TYPE_MISC,
     NULL, "sosend", "copy small");      NULL, "sosend", "copy small");
 struct evcnt sosend_kvalimit = EVCNT_INITIALIZER(EVCNT_TYPE_MISC,  static struct evcnt sosend_kvalimit = EVCNT_INITIALIZER(EVCNT_TYPE_MISC,
     NULL, "sosend", "kva limit");      NULL, "sosend", "kva limit");
   
 #define SOSEND_COUNTER_INCR(ev)         (ev)->ev_count++  #define SOSEND_COUNTER_INCR(ev)         (ev)->ev_count++
Line 132  soinit(void)
Line 132  soinit(void)
   
         /* Set the initial adjusted socket buffer size. */          /* Set the initial adjusted socket buffer size. */
         if (sb_max_set(sb_max))          if (sb_max_set(sb_max))
                 panic("bad initial sb_max value: %lu\n", sb_max);                  panic("bad initial sb_max value: %lu", sb_max);
   
 }  }
   
Line 142  int use_sosend_loan = 0;
Line 142  int use_sosend_loan = 0;
 int use_sosend_loan = 1;  int use_sosend_loan = 1;
 #endif  #endif
   
 struct simplelock so_pendfree_slock = SIMPLELOCK_INITIALIZER;  static struct simplelock so_pendfree_slock = SIMPLELOCK_INITIALIZER;
 struct mbuf *so_pendfree;  static struct mbuf *so_pendfree;
   
 #ifndef SOMAXKVA  #ifndef SOMAXKVA
 #define SOMAXKVA (16 * 1024 * 1024)  #define SOMAXKVA (16 * 1024 * 1024)
 #endif  #endif
 int somaxkva = SOMAXKVA;  int somaxkva = SOMAXKVA;
 int socurkva;  static int socurkva;
 int sokvawaiters;  static int sokvawaiters;
   
 #define SOCK_LOAN_THRESH        4096  #define SOCK_LOAN_THRESH        4096
 #define SOCK_LOAN_CHUNK         65536  #define SOCK_LOAN_CHUNK         65536
   
 static size_t sodopendfree(struct socket *);  static size_t sodopendfree(struct socket *);
 static size_t sodopendfreel(struct socket *);  static size_t sodopendfreel(struct socket *);
 static __inline vsize_t sokvareserve(struct socket *, vsize_t);  
 static __inline void sokvaunreserve(vsize_t);  
   
 static __inline vsize_t  static vsize_t
 sokvareserve(struct socket *so, vsize_t len)  sokvareserve(struct socket *so, vsize_t len)
 {  {
         int s;          int s;
Line 200  sokvareserve(struct socket *so, vsize_t 
Line 198  sokvareserve(struct socket *so, vsize_t 
         return len;          return len;
 }  }
   
 static __inline void  static void
 sokvaunreserve(vsize_t len)  sokvaunreserve(vsize_t len)
 {  {
         int s;          int s;
Line 1405  sosetopt(struct socket *so, int level, i
Line 1403  sosetopt(struct socket *so, int level, i
                                 error = EINVAL;                                  error = EINVAL;
                                 goto bad;                                  goto bad;
                         }                          }
                           if (mtod(m, struct linger *)->l_linger < 0 ||
                               mtod(m, struct linger *)->l_linger > (INT_MAX / hz)) {
                                   error = EDOM;
                                   goto bad;
                           }
                         so->so_linger = mtod(m, struct linger *)->l_linger;                          so->so_linger = mtod(m, struct linger *)->l_linger;
                         /* fall thru... */                          /* fall thru... */
   

Legend:
Removed from v.1.110  
changed lines
  Added in v.1.113

CVSweb <webmaster@jp.NetBSD.org>