[prev in list] [next in list] [prev in thread] [next in thread] 

List:       freebsd-hackers
Subject:    Re: TUNABLE_INT question
From:       Roman Divacky <rdivacky () freebsd ! org>
Date:       2009-02-18 7:59:55
Message-ID: 20090218075955.GA66426 () freebsd ! org
[Download RAW message or body]

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
_______________________________________________
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic