From owner-svn-src-all@FreeBSD.ORG Sat Dec 8 04:19:11 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 36381331; Sat, 8 Dec 2012 04:19:11 +0000 (UTC) (envelope-from neelnatu@gmail.com) Received: from mail-ie0-f179.google.com (mail-ie0-f179.google.com [209.85.223.179]) by mx1.freebsd.org (Postfix) with ESMTP id C75B58FC13; Sat, 8 Dec 2012 04:19:10 +0000 (UTC) Received: by mail-ie0-f179.google.com with SMTP id k14so3111349iea.24 for ; Fri, 07 Dec 2012 20:19:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=4SgVqUKzOljs6VptmEfC15YBNZvaMOUxpS7CvlNODdM=; b=fpATwC+uZD9necyP15xc5mXQ789FeLKyrQ64CgJpkdFQ7opg/EGwpN1WzxXv46seTp EBb4j5kcOPjRjdRbgV8zR4FoNyD3qqxXphJElxQOdst9RoSr0DTXjfHhoJ9VIP9oHmWG QdIWK7jHOVOS6SX1lOhk3qbRP9u2ME1VY1dH2w/GZ0GZ7ARlJYJydlEcQvnbM8Tgd8b2 ZlzI3DvHuulWgAkZ/0fa/FQkAxdh27qTDgiEI5iDbdshFS1NLCqMuHGDL/f9uB3X+Ul5 zmcq4xFGPB5ZNHlkYB5wX/bpEPG1hg9Krc3WyLb3lyt0bnML96O0GkcjmORSqS51Vmq/ ZPQg== MIME-Version: 1.0 Received: by 10.50.45.168 with SMTP id o8mr1046125igm.50.1354940343893; Fri, 07 Dec 2012 20:19:03 -0800 (PST) Received: by 10.43.112.194 with HTTP; Fri, 7 Dec 2012 20:19:03 -0800 (PST) In-Reply-To: <201212072215.qB7MFpOd095828@svn.freebsd.org> References: <201212072215.qB7MFpOd095828@svn.freebsd.org> Date: Fri, 7 Dec 2012 20:19:03 -0800 Message-ID: Subject: Re: svn commit: r243994 - head/sys/kern From: Neel Natu To: Pawel Jakub Dawidek Content-Type: text/plain; charset=ISO-8859-1 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 Dec 2012 04:19:11 -0000 Hi Pawel, On Fri, Dec 7, 2012 at 2:15 PM, Pawel Jakub Dawidek 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