From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57358) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UrQx7-0003xm-Bx for qemu-devel@nongnu.org; Tue, 25 Jun 2013 06:58:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UrQx6-0003II-B0 for qemu-devel@nongnu.org; Tue, 25 Jun 2013 06:58:25 -0400 Message-ID: <51C977C4.5010603@redhat.com> Date: Tue, 25 Jun 2013 12:58:12 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1372101677-46175-1-git-send-email-emaste@freebsd.org> <51C8B6EF.5070108@redhat.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] tls.h: Enable TLS on FreeBSD List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: qemu-trivial@nongnu.org, Ed Maste , qemu-devel@nongnu.org Il 25/06/2013 12:56, Peter Maydell ha scritto: > On 24 June 2013 22:15, Paolo Bonzini wrote: >> I and Stefan Hajnoczi have almost the same idea implemented in QEMU >> (except that get_foo() returns a pointer to the variable). But >> pthread_get/setspecific would be too slow for cpu_single_env, so we're >> just switching to __thread for cpu_single_env (for Linux in our patches, >> but you can add FreeBSD too once it's needed). > > By the way, what's the plan for Windows? Does that support > __thread too, or will there still need to be some windows > specific magic? __thread is supported but slow, so there is a small amount of Windows-specific magic (but it won't affect the users of tls.h). Paolo