qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@web.de>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: peter.maydell@linaro.org, agraf@suse.de,
	"Dr. David Alan Gilbert" <david.gilbert@linaro.org>,
	qemu-devel@nongnu.org, patches@linaro.org
Subject: Re: [Qemu-devel] [PATCH] Make cpu_single_env thread local (Linux only for now)
Date: Wed, 05 Oct 2011 09:52:00 +0200	[thread overview]
Message-ID: <4E8C0CA0.2010006@web.de> (raw)
In-Reply-To: <4E8C0275.50107@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 1153 bytes --]

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 that
>> you can start using TLS already inside constructors).
> 
> 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.

> 
> 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


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 262 bytes --]

  reply	other threads:[~2011-10-05  7:52 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-03 16:33 [Qemu-devel] [PATCH] Make cpu_single_env thread local (Linux only for now) Dr. David Alan Gilbert
2011-10-03 17:51 ` Jan Kiszka
2011-10-04 15:10   ` Lluís Vilanova
2011-10-04 17:26     ` Jan Kiszka
2011-10-05  7:08       ` Paolo Bonzini
2011-10-05  7:52         ` Jan Kiszka [this message]
2011-10-05  9:21           ` Paolo Bonzini
2011-10-07 17:29             ` David Gilbert
2011-10-08 13:41               ` Paolo Bonzini
2011-10-26 14:03             ` Peter Maydell
2011-10-26 14:39               ` Paolo Bonzini
2011-10-26 14:54                 ` Peter Maydell
2011-10-26 14:59                   ` Paolo Bonzini
2011-10-26 15:02                   ` Jan Kiszka
2011-10-26 15:09                     ` Peter Maydell
2011-10-26 15:13                       ` Jan Kiszka
2011-10-26 15:18                         ` Peter Maydell
2011-10-26 16:02                           ` Jan Kiszka
2011-10-26 16:27                             ` Andreas Färber
2011-10-26 16:31                               ` Jan Kiszka

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4E8C0CA0.2010006@web.de \
    --to=jan.kiszka@web.de \
    --cc=agraf@suse.de \
    --cc=david.gilbert@linaro.org \
    --cc=patches@linaro.org \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).