TUNABLE_INT question
Roman Divacky
rdivacky at freebsd.org
Fri Feb 13 10:53:46 PST 2009
hi
#define TUNABLE_INT(path, var) \
static struct tunable_int __CONCAT(__tunable_int_, __LINE__) = { \
(path), \
(var), \
}; \
SYSINIT(__CONCAT(__Tunable_init_, __LINE__), \
SI_SUB_TUNABLES, SI_ORDER_MIDDLE, tunable_int_init, \
&__CONCAT(__tunable_int_, __LINE__))
this is the code for TUNABLE_INT macro, the first param
to SYSINIT is an "uniquifier" which is "__Tunable_init_X"
where is is a number specifying line.
if I read it correctly there is no protection from collisions, am
I right? is it a proper fix to concat __FILE__ there too?
thnx
roman
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-hackers/attachments/20090213/3d5c0ecc/attachment.pgp
More information about the freebsd-hackers
mailing list