From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:34057) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RBMHE-00087H-DB for qemu-devel@nongnu.org; Wed, 05 Oct 2011 03:52:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RBMHD-000319-CN for qemu-devel@nongnu.org; Wed, 05 Oct 2011 03:52:28 -0400 Received: from fmmailgate02.web.de ([217.72.192.227]:43894) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RBMHC-000312-VY for qemu-devel@nongnu.org; Wed, 05 Oct 2011 03:52:27 -0400 Message-ID: <4E8C0CA0.2010006@web.de> Date: Wed, 05 Oct 2011 09:52:00 +0200 From: Jan Kiszka MIME-Version: 1.0 References: <20111003163352.GA22822@davesworkthinkpad> <4E89F62E.1020804@web.de> <87lit0n66z.fsf@ginnungagap.bsc.es> <4E8B41D8.3050502@web.de> <4E8C0275.50107@redhat.com> In-Reply-To: <4E8C0275.50107@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig69AF5F4F7B40A1F39BB3E499" Sender: jan.kiszka@web.de Subject: Re: [Qemu-devel] [PATCH] Make cpu_single_env thread local (Linux only for now) List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: peter.maydell@linaro.org, agraf@suse.de, "Dr. David Alan Gilbert" , qemu-devel@nongnu.org, patches@linaro.org This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig69AF5F4F7B40A1F39BB3E499 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 2011-10-05 09:08, Paolo Bonzini wrote: > On 10/04/2011 07:26 PM, Jan Kiszka wrote: >> Looks like a start. But I would avoid macros and go for (static inline= ) >> functions where possible. And initialization should be explicit (so th= at >> you can start using TLS already inside constructors). >=20 > Here is the patch I wrote to do more or less the same thing, plus > Windows support. It's a bit different in that I wrote a macro that can= > be used as lvalue. Yeah, it probably makes sense to build the abstractions around __thread so that - one day - we can drop the legacy wrappers. Just do not prepend "tls__" in the gcc model (there is also some inconsistency with prefixes in patch 3). And avoid leading "_" unless they are dictated by the platform. And patch 3 needs to update darwin-user/main.c as well. >=20 > It doesn't let you use TLS inside constructors, however, unless you use= > constructor priorities. What is the default priority of constructors BTW? You picked the highest, will others that do not specify one have the same? Then we could also define a QEMU_CONSTRUCTOR wrapper with a lower priority. Jan --------------enig69AF5F4F7B40A1F39BB3E499 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.16 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk6MDKMACgkQitSsb3rl5xRBOwCeIFUKaSblQ4tpIQ2I19skhgw8 10UAoN7tLDvmwEJLlHa6hc6Kd1iDbbce =kFRC -----END PGP SIGNATURE----- --------------enig69AF5F4F7B40A1F39BB3E499--