subr_param.c (58820) | subr_param.c (59839) |
---|---|
1/* 2 * Copyright (c) 1980, 1986, 1989, 1993 3 * The Regents of the University of California. All rights reserved. 4 * (c) UNIX System Laboratories, Inc. 5 * All or some portions of this file are derived from material licensed 6 * to the University of California by American Telephone and Telegraph 7 * Co. or Unix System Laboratories, Inc. and are reproduced herein with 8 * the permission of UNIX System Laboratories, Inc. --- 22 unchanged lines hidden (view full) --- 31 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 32 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 33 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 34 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 35 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 36 * SUCH DAMAGE. 37 * 38 * @(#)param.c 8.3 (Berkeley) 8/20/94 | 1/* 2 * Copyright (c) 1980, 1986, 1989, 1993 3 * The Regents of the University of California. All rights reserved. 4 * (c) UNIX System Laboratories, Inc. 5 * All or some portions of this file are derived from material licensed 6 * to the University of California by American Telephone and Telegraph 7 * Co. or Unix System Laboratories, Inc. and are reproduced herein with 8 * the permission of UNIX System Laboratories, Inc. --- 22 unchanged lines hidden (view full) --- 31 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 32 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 33 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 34 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 35 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 36 * SUCH DAMAGE. 37 * 38 * @(#)param.c 8.3 (Berkeley) 8/20/94 |
39 * $FreeBSD: head/sys/kern/subr_param.c 58820 2000-03-30 07:17:05Z peter $ | 39 * $FreeBSD: head/sys/kern/subr_param.c 59839 2000-05-01 13:33:56Z peter $ |
40 */ 41 42#include <stddef.h> 43 | 40 */ 41 42#include <stddef.h> 43 |
44#include "opt_sysvipc.h" | |
45#include "opt_param.h" 46 47#include <sys/param.h> 48 | 44#include "opt_param.h" 45 46#include <sys/param.h> 47 |
49#ifdef SYSVSEM 50#include <sys/sem.h> 51#endif 52#ifdef SYSVMSG 53#include <sys/msg.h> 54#endif 55 | |
56/* 57 * System parameter formulae. 58 * 59 * This file is copied into each directory where we compile 60 * the kernel; it should be modified there to suit local taste 61 * if necessary. 62 * 63 * Compiled with -DMAXUSERS=xx --- 18 unchanged lines hidden (view full) --- 82 83/* maximum # of sf_bufs (sendfile(2) zero-copy virtual buffers) */ 84#ifndef NSFBUFS 85#define NSFBUFS (512 + MAXUSERS * 16) 86#endif 87int nsfbufs = NSFBUFS; 88 89/* | 48/* 49 * System parameter formulae. 50 * 51 * This file is copied into each directory where we compile 52 * the kernel; it should be modified there to suit local taste 53 * if necessary. 54 * 55 * Compiled with -DMAXUSERS=xx --- 18 unchanged lines hidden (view full) --- 74 75/* maximum # of sf_bufs (sendfile(2) zero-copy virtual buffers) */ 76#ifndef NSFBUFS 77#define NSFBUFS (512 + MAXUSERS * 16) 78#endif 79int nsfbufs = NSFBUFS; 80 81/* |
90 * Values in support of System V compatible semaphores. 91 */ 92 93#ifdef SYSVSEM 94 95struct seminfo seminfo = { 96 SEMMAP, /* # of entries in semaphore map */ 97 SEMMNI, /* # of semaphore identifiers */ 98 SEMMNS, /* # of semaphores in system */ 99 SEMMNU, /* # of undo structures in system */ 100 SEMMSL, /* max # of semaphores per id */ 101 SEMOPM, /* max # of operations per semop call */ 102 SEMUME, /* max # of undo entries per process */ 103 SEMUSZ, /* size in bytes of undo structure */ 104 SEMVMX, /* semaphore maximum value */ 105 SEMAEM /* adjust on exit max value */ 106}; 107#endif 108 109/* 110 * Values in support of System V compatible messages. 111 */ 112 113#ifdef SYSVMSG 114 115struct msginfo msginfo = { 116 MSGMAX, /* max chars in a message */ 117 MSGMNI, /* # of message queue identifiers */ 118 MSGMNB, /* max chars in a queue */ 119 MSGTQL, /* max messages in system */ 120 MSGSSZ, /* size of a message segment */ 121 /* (must be small power of 2 greater than 4) */ 122 MSGSEG /* number of message segments */ 123}; 124#endif 125 126/* | |
127 * These may be set to nonzero here or by patching. 128 * If they are nonzero at bootstrap time then they are 129 * initialized to values dependent on the memory size. 130 */ 131#ifdef NBUF 132int nbuf = NBUF; 133#else 134int nbuf = 0; 135#endif 136int nswbuf = 0; 137 138/* 139 * These have to be allocated somewhere; allocating 140 * them here forces loader errors if this file is omitted 141 * (if they've been externed everywhere else; hah!). 142 */ 143struct buf *swbuf; | 82 * These may be set to nonzero here or by patching. 83 * If they are nonzero at bootstrap time then they are 84 * initialized to values dependent on the memory size. 85 */ 86#ifdef NBUF 87int nbuf = NBUF; 88#else 89int nbuf = 0; 90#endif 91int nswbuf = 0; 92 93/* 94 * These have to be allocated somewhere; allocating 95 * them here forces loader errors if this file is omitted 96 * (if they've been externed everywhere else; hah!). 97 */ 98struct buf *swbuf; |