From owner-freebsd-hackers@FreeBSD.ORG Fri Feb 13 18:53:45 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 C5CB8106564A for ; Fri, 13 Feb 2009 18:53:45 +0000 (UTC) (envelope-from rdivacky@vlk.vlakno.cz) Received: from vlakno.cz (77-93-215-190.static.masterinter.net [77.93.215.190]) by mx1.freebsd.org (Postfix) with ESMTP id 7D5008FC1C for ; Fri, 13 Feb 2009 18:53:45 +0000 (UTC) (envelope-from rdivacky@vlk.vlakno.cz) Received: from localhost (localhost [127.0.0.1]) by vlakno.cz (Postfix) with ESMTP id E1E4D9CB097 for ; Fri, 13 Feb 2009 19:32:31 +0100 (CET) X-Virus-Scanned: amavisd-new at vlakno.cz Received: from vlakno.cz ([127.0.0.1]) by localhost (lev.vlakno.cz [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id DeXtt8gZQajd for ; Fri, 13 Feb 2009 19:32:29 +0100 (CET) Received: from vlk.vlakno.cz (localhost [127.0.0.1]) by vlakno.cz (Postfix) with ESMTP id B38909CB141 for ; Fri, 13 Feb 2009 19:32:29 +0100 (CET) Received: (from rdivacky@localhost) by vlk.vlakno.cz (8.14.3/8.14.3/Submit) id n1DIWT3G094491 for hackers@freebsd.org; Fri, 13 Feb 2009 19:32:29 +0100 (CET) (envelope-from rdivacky) Date: Fri, 13 Feb 2009 19:32:29 +0100 From: Roman Divacky To: hackers@freebsd.org Message-ID: <20090213183229.GA94272@freebsd.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="r5Pyd7+fXNt84Ff3" Content-Disposition: inline User-Agent: Mutt/1.4.2.3i Cc: Subject: 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: Fri, 13 Feb 2009 18:53:46 -0000 --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--