Date: Fri, 7 Dec 2012 20:19:03 -0800 From: Neel Natu <neelnatu@gmail.com> To: Pawel Jakub Dawidek <pjd@freebsd.org> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r243994 - head/sys/kern Message-ID: <CAFgRE9HQFX9MNcJD9_cTOs2XmTm0tEqDTwzgfkDwYFKj%2BT3HQw@mail.gmail.com> In-Reply-To: <201212072215.qB7MFpOd095828@svn.freebsd.org> References: <201212072215.qB7MFpOd095828@svn.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Hi Pawel, On Fri, Dec 7, 2012 at 2:15 PM, Pawel Jakub Dawidek <pjd@freebsd.org> wrote: > 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); > } This is breaking "buildkernel": cc -c -O2 -pipe -fno-strict-aliasing -std=c99 -g -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef -Wno-pointer-sign -fformat-extensions -Wmissing-include-dirs -fdiagnostics-show-option -Wno-error-tautological-compare -Wno-error-empty-body -Wno-error-parentheses-equality -nostdinc -I. -I/usr/freebsd/head/sys -I/usr/freebsd/head/sys/contrib/altq -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h -fno-omit-frame-pointer -mno-aes -mno-avx -mcmodel=kernel -mno-red-zone -mno-mmx -mno-sse -msoft-float -fno-asynchronous-unwind-tables -ffreestanding -fstack-protector -Werror /usr/freebsd/head/sys/kern/uipc_socket.c /usr/freebsd/head/sys/kern/uipc_socket.c:262:19: error: static declaration of 'socket_zone' follows non-static declaration static uma_zone_t socket_zone; ^ /usr/freebsd/head/sys/sys/socketvar.h:297:25: note: previous definition is here extern struct uma_zone *socket_zone; ^ 1 error generated. *** [uipc_socket.o] Error code 1 1 error *** [buildkernel] Error code 2 1 error best Neel
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAFgRE9HQFX9MNcJD9_cTOs2XmTm0tEqDTwzgfkDwYFKj%2BT3HQw>