Move inclusion of "opt_sb_max.h" from sys/socketvar.h to

conf/param.c, and move the initialisation of the sb_max
variable from kern/uipc_socket2.c to conf/param.c.  Now
everthing that includes sys/socketvar.h doesn't get
recompiled when SB_MAX's value changes.
This commit is contained in:
simonb 1999-04-22 04:50:05 +00:00
parent b30d0fe7ba
commit 8ce41be7b0
3 changed files with 8 additions and 9 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: param.c,v 1.25 1998/10/23 19:37:32 jonathan Exp $ */
/* $NetBSD: param.c,v 1.26 1999/04/22 04:50:05 simonb Exp $ */
/*
* Copyright (c) 1980, 1986, 1989 Regents of the University of California.
@ -41,11 +41,13 @@
*/
#include "opt_rtc_offset.h"
#include "opt_sb_max.h"
#include "opt_sysv.h"
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/socket.h>
#include <sys/socketvar.h>
#include <sys/proc.h>
#include <sys/vnode.h>
#include <sys/file.h>
@ -102,6 +104,7 @@ int ncallout = 16 + NPROC;
int nclist = 60 + 12 * MAXUSERS;
#endif
int nmbclusters = NMBCLUSTERS;
u_long sb_max = SB_MAX; /* maximum socket buffer size */
int fscale = FSCALE; /* kernel uses `FSCALE', user uses `fscale' */
/*

View File

@ -1,4 +1,4 @@
/* $NetBSD: uipc_socket2.c,v 1.28 1999/03/23 10:45:37 lukem Exp $ */
/* $NetBSD: uipc_socket2.c,v 1.29 1999/04/22 04:50:06 simonb Exp $ */
/*
* Copyright (c) 1982, 1986, 1988, 1990, 1993
@ -56,8 +56,6 @@ const char netio[] = "netio";
const char netcon[] = "netcon";
const char netcls[] = "netcls";
u_long sb_max = SB_MAX; /* patchable */
/*
* Procedures to manipulate state flags of socket
* and do appropriate wakeups. Normal sequence from the

View File

@ -1,4 +1,4 @@
/* $NetBSD: socketvar.h,v 1.37 1999/03/23 10:45:37 lukem Exp $ */
/* $NetBSD: socketvar.h,v 1.38 1999/04/22 04:50:06 simonb Exp $ */
/*-
* Copyright (c) 1982, 1986, 1990, 1993
@ -41,9 +41,7 @@
#include <sys/select.h> /* for struct selinfo */
#include <sys/queue.h>
#if defined(_KERNEL) && !defined(_LKM)
#include "opt_sb_max.h"
#else
#if !defined(_KERNEL) || defined(LKM)
struct uio;
#endif
@ -225,7 +223,7 @@ struct socket {
} while (0)
#ifdef _KERNEL
u_long sb_max;
extern u_long sb_max;
/* to catch callers missing new second argument to sonewconn: */
#define sonewconn(head, connstatus) sonewconn1((head), (connstatus))
struct socket *sonewconn1 __P((struct socket *head, int connstatus));