[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.93 and 1.94

version 1.93, 2004/03/17 10:03:26 version 1.94, 2004/03/17 10:21:59
Line 1699  soo_kqfilter(struct file *fp, struct kno
Line 1699  soo_kqfilter(struct file *fp, struct kno
         return (0);          return (0);
 }  }
   
   #include <sys/sysctl.h>
   
   static int sysctl_kern_somaxkva(SYSCTLFN_PROTO);
   
   /*
    * sysctl helper routine for kern.somaxkva.  ensures that the given
    * value is not too small.
    * (XXX should we maybe make sure it's not too large as well?)
    */
   static int
   sysctl_kern_somaxkva(SYSCTLFN_ARGS)
   {
           int error, new_somaxkva;
           struct sysctlnode node;
           int s;
   
           new_somaxkva = somaxkva;
           node = *rnode;
           node.sysctl_data = &new_somaxkva;
           error = sysctl_lookup(SYSCTLFN_CALL(&node));
           if (error || newp == NULL)
                   return (error);
   
           if (new_somaxkva < (16 * 1024 * 1024)) /* sanity */
                   return (EINVAL);
   
           s = splvm();
           simple_lock(&so_pendfree_slock);
           somaxkva = new_somaxkva;
           wakeup(&socurkva);
           simple_unlock(&so_pendfree_slock);
           splx(s);
   
           return (error);
   }
   
   SYSCTL_SETUP(sysctl_kern_somaxkva_setup, "sysctl kern.somaxkva setup")
   {
   
           sysctl_createv(SYSCTL_PERMANENT|SYSCTL_READWRITE,
                          CTLTYPE_INT, "somaxkva", NULL,
                          sysctl_kern_somaxkva, 0, NULL, 0,
                          CTL_KERN, KERN_SOMAXKVA, CTL_EOL);
   }

Legend:
Removed from v.1.93  
changed lines
  Added in v.1.94

CVSweb <webmaster@jp.NetBSD.org>