From owner-freebsd-hackers@FreeBSD.ORG Tue Feb 17 22:24:44 2009 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 69BEA10656CE; Tue, 17 Feb 2009 22:24:44 +0000 (UTC) (envelope-from rdivacky@vlk.vlakno.cz) Received: from vlakno.cz (77-93-215-190.static.masterinter.net [77.93.215.190]) by mx1.freebsd.org (Postfix) with ESMTP id 1BF8B8FC20; Tue, 17 Feb 2009 22:24:43 +0000 (UTC) (envelope-from rdivacky@vlk.vlakno.cz) Received: from localhost (localhost [127.0.0.1]) by vlakno.cz (Postfix) with ESMTP id 515569CB0FB; Tue, 17 Feb 2009 23:21:44 +0100 (CET) X-Virus-Scanned: amavisd-new at vlakno.cz Received: from vlakno.cz ([127.0.0.1]) by localhost (lev.vlakno.cz [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id PIDEFEHT6ITp; Tue, 17 Feb 2009 23:21:42 +0100 (CET) Received: from vlk.vlakno.cz (localhost [127.0.0.1]) by vlakno.cz (Postfix) with ESMTP id 1EB089CB125; Tue, 17 Feb 2009 23:21:42 +0100 (CET) Received: (from rdivacky@localhost) by vlk.vlakno.cz (8.14.3/8.14.3/Submit) id n1HMLg7c094998; Tue, 17 Feb 2009 23:21:42 +0100 (CET) (envelope-from rdivacky) Date: Tue, 17 Feb 2009 23:21:42 +0100 From: Roman Divacky To: John Baldwin Message-ID: <20090217222142.GA94925@freebsd.org> References: <20090213183229.GA94272@freebsd.org> <20090213221607.GA25161@freebsd.org> <200902170931.12983.jhb@freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200902170931.12983.jhb@freebsd.org> User-Agent: Mutt/1.4.2.3i Cc: freebsd-hackers@freebsd.org, hackers@freebsd.org, Ryan Stone Subject: Re: TUNABLE_INT question X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Feb 2009 22:24:44 -0000 On Tue, Feb 17, 2009 at 09:31:12AM -0500, John Baldwin wrote: > On Friday 13 February 2009 5:16:07 pm Roman Divacky wrote: > > On Fri, Feb 13, 2009 at 03:55:44PM -0500, Ryan Stone wrote: > > > __FILE__ is a string so you can't concat that with anything to produce an > > > identifier. In any case, the variable is static so there can't be any > > > collision problems with other files. > > > > I was talking about the SYSINIT parameter. thats a section in a .o > > file, and I am getting collisions there... > > Hmm, are you doing something like this: > > #define FOO(string) \ > TUNABLE_INT(string ## ".bar", &bar); \ > TUNABLE_INT(string ## ".foo", &foo); \ > > FOO(baz) > > That would collide as both of the TUNABLE_INT() invocations would have the > same __LINE__ (the line number of the 'FOO(baz)'). no.. it was just two tunables in two files that happened to end up in the same line. fixed now