Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys Move inclusion of "opt_sb_max.h" from sys/socketvar.h to



details:   https://anonhg.NetBSD.org/src/rev/715ba8b3dc98
branches:  trunk
changeset: 472132:715ba8b3dc98
user:      simonb <simonb%NetBSD.org@localhost>
date:      Thu Apr 22 04:50:05 1999 +0000

description:
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.

diffstat:

 sys/conf/param.c        |  5 ++++-
 sys/kern/uipc_socket2.c |  4 +---
 sys/sys/socketvar.h     |  8 +++-----
 3 files changed, 8 insertions(+), 9 deletions(-)

diffs (78 lines):

diff -r 27343931ac86 -r 715ba8b3dc98 sys/conf/param.c
--- a/sys/conf/param.c  Thu Apr 22 04:40:58 1999 +0000
+++ b/sys/conf/param.c  Thu Apr 22 04:50:05 1999 +0000
@@ -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    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' */
 
 /*
diff -r 27343931ac86 -r 715ba8b3dc98 sys/kern/uipc_socket2.c
--- a/sys/kern/uipc_socket2.c   Thu Apr 22 04:40:58 1999 +0000
+++ b/sys/kern/uipc_socket2.c   Thu Apr 22 04:50:05 1999 +0000
@@ -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     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
diff -r 27343931ac86 -r 715ba8b3dc98 sys/sys/socketvar.h
--- a/sys/sys/socketvar.h       Thu Apr 22 04:40:58 1999 +0000
+++ b/sys/sys/socketvar.h       Thu Apr 22 04:50:05 1999 +0000
@@ -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 @@
                        } 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));



Home | Main Index | Thread Index | Old Index