uipc_sockbuf.c (77598) | uipc_sockbuf.c (77843) |
---|---|
1/* 2 * Copyright (c) 1982, 1986, 1988, 1990, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 17 unchanged lines hidden (view full) --- 26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31 * SUCH DAMAGE. 32 * 33 * @(#)uipc_socket2.c 8.1 (Berkeley) 6/10/93 | 1/* 2 * Copyright (c) 1982, 1986, 1988, 1990, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 17 unchanged lines hidden (view full) --- 26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31 * SUCH DAMAGE. 32 * 33 * @(#)uipc_socket2.c 8.1 (Berkeley) 6/10/93 |
34 * $FreeBSD: head/sys/kern/uipc_sockbuf.c 77598 2001-06-01 21:47:34Z jesper $ | 34 * $FreeBSD: head/sys/kern/uipc_sockbuf.c 77843 2001-06-06 22:17:08Z peter $ |
35 */ 36 37#include "opt_param.h" 38#include <sys/param.h> 39#include <sys/systm.h> 40#include <sys/domain.h> 41#include <sys/file.h> /* for maxfiles */ 42#include <sys/kernel.h> --- 964 unchanged lines hidden (view full) --- 1007SYSCTL_INT(_kern_ipc, KIPC_SOCKBUF_WASTE, sockbuf_waste_factor, CTLFLAG_RW, 1008 &sb_efficiency, 0, ""); 1009 1010/* 1011 * Initialise maxsockets 1012 */ 1013static void init_maxsockets(void *ignored) 1014{ | 35 */ 36 37#include "opt_param.h" 38#include <sys/param.h> 39#include <sys/systm.h> 40#include <sys/domain.h> 41#include <sys/file.h> /* for maxfiles */ 42#include <sys/kernel.h> --- 964 unchanged lines hidden (view full) --- 1007SYSCTL_INT(_kern_ipc, KIPC_SOCKBUF_WASTE, sockbuf_waste_factor, CTLFLAG_RW, 1008 &sb_efficiency, 0, ""); 1009 1010/* 1011 * Initialise maxsockets 1012 */ 1013static void init_maxsockets(void *ignored) 1014{ |
1015 TUNABLE_INT_FETCH("kern.ipc.maxsockets", 0, maxsockets); 1016 maxsockets = imax(maxsockets, imax(maxfiles, nmbclusters)); | 1015 TUNABLE_INT_FETCH("kern.ipc.maxsockets", &maxsockets); 1016 maxsockets = imax(maxsockets, imax(maxfiles, nmbclusters)); |
1017} 1018SYSINIT(param, SI_SUB_TUNABLES, SI_ORDER_ANY, init_maxsockets, NULL); | 1017} 1018SYSINIT(param, SI_SUB_TUNABLES, SI_ORDER_ANY, init_maxsockets, NULL); |