Date: Fri, 13 Feb 2009 19:32:29 +0100 From: Roman Divacky <rdivacky@freebsd.org> To: hackers@freebsd.org Subject: TUNABLE_INT question Message-ID: <20090213183229.GA94272@freebsd.org>
next in thread | raw e-mail | index | archive | help
[-- Attachment #1 --]
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
[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.10 (FreeBSD)
iEYEARECAAYFAkmVvLcACgkQLVEj6D3CBEwOJQCfUBgvia0XT8kqUzMbXMwKpLlk
zacAnRZzTtfyeS3NNeNBK2sM67tvhFu8
=kLJV
-----END PGP SIGNATURE-----
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20090213183229.GA94272>
