Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 7 Dec 2012 22:15:51 +0000 (UTC)
From:      Pawel Jakub Dawidek <pjd@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r243994 - head/sys/kern
Message-ID:  <201212072215.qB7MFpOd095828@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: pjd
Date: Fri Dec  7 22:15:51 2012
New Revision: 243994
URL: http://svnweb.freebsd.org/changeset/base/243994

Log:
  - Make socket_zone static - it is used only in this file.
  - Update maxsockets on uma_zone_set_max().
  
  Obtained from:	WHEEL Systems

Modified:
  head/sys/kern/uipc_socket.c

Modified: head/sys/kern/uipc_socket.c
==============================================================================
--- head/sys/kern/uipc_socket.c	Fri Dec  7 22:13:33 2012	(r243993)
+++ head/sys/kern/uipc_socket.c	Fri Dec  7 22:15:51 2012	(r243994)
@@ -259,14 +259,14 @@ SYSCTL_NODE(_kern, KERN_IPC, ipc, CTLFLA
  * Initialize the socket subsystem and set up the socket
  * memory allocator.
  */
-uma_zone_t socket_zone;
+static uma_zone_t socket_zone;
 int	maxsockets;
 
 static void
 socket_zone_change(void *tag)
 {
 
-	uma_zone_set_max(socket_zone, maxsockets);
+	maxsockets = uma_zone_set_max(socket_zone, maxsockets);
 }
 
 static void
@@ -275,7 +275,7 @@ socket_init(void *tag)
 
 	socket_zone = uma_zcreate("socket", sizeof(struct socket), NULL, NULL,
 	    NULL, NULL, UMA_ALIGN_PTR, UMA_ZONE_NOFREE);
-	uma_zone_set_max(socket_zone, maxsockets);
+	maxsockets = uma_zone_set_max(socket_zone, maxsockets);
 	EVENTHANDLER_REGISTER(maxsockets_change, socket_zone_change, NULL,
 	    EVENTHANDLER_PRI_FIRST);
 }



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201212072215.qB7MFpOd095828>