Skip site navigation (1)Skip section navigation (2)
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

--r5Pyd7+fXNt84Ff3
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

hi
 =20
#define TUNABLE_INT(path, var)                                  \
        static struct tunable_int __CONCAT(__tunable_int_, __LINE__) =3D { \
                (path),                                         \
                (var),                                          \
        };                                                      \
        SYSINIT(__CONCAT(__Tunable_init_, __LINE__),            \
            SI_SUB_TUNABLES, SI_ORDER_MIDDLE, tunable_int_init, \
            &__CONCAT(__tunable_int_, __LINE__))
 =20
 =20
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.
 =20
if I read it correctly there is no protection from collisions, am
I right?  is it a proper fix to concat __FILE__ there too?
 =20
thnx
 =20
roman



--r5Pyd7+fXNt84Ff3
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.10 (FreeBSD)

iEYEARECAAYFAkmVvLcACgkQLVEj6D3CBEwOJQCfUBgvia0XT8kqUzMbXMwKpLlk
zacAnRZzTtfyeS3NNeNBK2sM67tvhFu8
=kLJV
-----END PGP SIGNATURE-----

--r5Pyd7+fXNt84Ff3--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20090213183229.GA94272>