From owner-freebsd-hackers@FreeBSD.ORG Tue Feb 17 22:23:23 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 10A301065670; Tue, 17 Feb 2009 22:23:23 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id D4F198FC16; Tue, 17 Feb 2009 22:23:22 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (pool-98-109-39-197.nwrknj.fios.verizon.net [98.109.39.197]) by cyrus.watson.org (Postfix) with ESMTPSA id 561C646B35; Tue, 17 Feb 2009 17:23:22 -0500 (EST) Received: from localhost (john@localhost [127.0.0.1]) (authenticated bits=0) by server.baldwin.cx (8.14.3/8.14.3) with ESMTP id n1HMNEkY037171; Tue, 17 Feb 2009 17:23:14 -0500 (EST) (envelope-from jhb@freebsd.org) From: John Baldwin To: freebsd-hackers@freebsd.org Date: Tue, 17 Feb 2009 09:31:12 -0500 User-Agent: KMail/1.9.7 References: <20090213183229.GA94272@freebsd.org> <20090213221607.GA25161@freebsd.org> In-Reply-To: <20090213221607.GA25161@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200902170931.12983.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (server.baldwin.cx [127.0.0.1]); Tue, 17 Feb 2009 17:23:14 -0500 (EST) X-Virus-Scanned: ClamAV 0.94.2/8998/Mon Feb 16 22:40:00 2009 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-4.0 required=4.2 tests=ALL_TRUSTED,AWL,BAYES_00, DATE_IN_PAST_06_12 autolearn=ham version=3.1.3 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on server.baldwin.cx Cc: Roman Divacky , 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:23:23 -0000 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)'). -- John Baldwin