From owner-freebsd-hackers@FreeBSD.ORG Wed Feb 18 08:02:59 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F36181065673; Wed, 18 Feb 2009 08:02:58 +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 AAF718FC38; Wed, 18 Feb 2009 08:02:58 +0000 (UTC) (envelope-from rdivacky@vlk.vlakno.cz) Received: from localhost (localhost [127.0.0.1]) by vlakno.cz (Postfix) with ESMTP id 3B9359CB084; Wed, 18 Feb 2009 08:59:58 +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 biF6ne595m9E; Wed, 18 Feb 2009 08:59:56 +0100 (CET) Received: from vlk.vlakno.cz (localhost [127.0.0.1]) by vlakno.cz (Postfix) with ESMTP id DEEDB9CB125; Wed, 18 Feb 2009 08:59:55 +0100 (CET) Received: (from rdivacky@localhost) by vlk.vlakno.cz (8.14.3/8.14.3/Submit) id n1I7xtcL066649; Wed, 18 Feb 2009 08:59:55 +0100 (CET) (envelope-from rdivacky) Date: Wed, 18 Feb 2009 08:59:55 +0100 From: Roman Divacky To: John Baldwin Message-ID: <20090218075955.GA66426@freebsd.org> References: <20090213183229.GA94272@freebsd.org> <200902170931.12983.jhb@freebsd.org> <20090217222142.GA94925@freebsd.org> <200902171751.13962.jhb@freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200902171751.13962.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: Wed, 18 Feb 2009 08:02:59 -0000 On Tue, Feb 17, 2009 at 05:51:13PM -0500, John Baldwin wrote: > On Tuesday 17 February 2009 5:21:42 pm Roman Divacky wrote: > > 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 > > Hmmm, odd. Those should be static and not matter. the symbol itself is static, but the section ELF section created might collide. anyway, this has been fixed and is not a problem anymore for me