|
From: | Paolo Bonzini |
Subject: | Re: [Qemu-devel] [PATCH] qemu-thread: add TLS wrappers |
Date: | Tue, 16 Aug 2011 23:55:07 -0700 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:5.0) Gecko/20110707 Thunderbird/5.0 |
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
[Prev in Thread] | Current Thread | [Next in Thread] |