From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:58805) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qta21-0003vP-LQ for qemu-devel@nongnu.org; Wed, 17 Aug 2011 02:55:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Qta20-0000gw-Nz for qemu-devel@nongnu.org; Wed, 17 Aug 2011 02:55:17 -0400 Received: from mail-pz0-f42.google.com ([209.85.210.42]:58914) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qta20-0000gk-Hc for qemu-devel@nongnu.org; Wed, 17 Aug 2011 02:55:16 -0400 Received: by pzk37 with SMTP id 37so639338pzk.29 for ; Tue, 16 Aug 2011 23:55:15 -0700 (PDT) Sender: Paolo Bonzini Message-ID: <4E4B65CB.70603@redhat.com> Date: Tue, 16 Aug 2011 23:55:07 -0700 From: Paolo Bonzini MIME-Version: 1.0 References: <1313520667-26507-1-git-send-email-pbonzini@redhat.com> <4E4B4557.2050505@comstyle.com> In-Reply-To: <4E4B4557.2050505@comstyle.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] qemu-thread: add TLS wrappers List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Brad Cc: qemu-devel@nongnu.org On 08/16/2011 09:36 PM, Brad wrote: > >> Win32 emulated TLS is slow and is not available on all versions of GCC. >> Actually, Win32 does have support for decent TLS, only GCC does not map >> __thread to it. The good news is, it's perfectly possible to declare >> TLS variables with simple C code! >> >> This patch adds wrappers to qemu-thread that will use __thread on POSIX >> systems, and the .tls segment on Windows. > > The actual use of TLS within QEMU on POSIX systems will be optional > though, right? Actually, TLS is already mandatory for both POSIX and Win32 systems. This patch tries to improve the situation on Windows, both by allowing older GCC versions, and by making TLS faster. On ELF systems, TLS has been supported by GCC for perhaps 10 years, there's no reason to care. Paolo