From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35219) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UrE6o-0001sk-0i for qemu-devel@nongnu.org; Mon, 24 Jun 2013 17:15:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UrE6m-00041B-Tu for qemu-devel@nongnu.org; Mon, 24 Jun 2013 17:15:33 -0400 Sender: Paolo Bonzini Message-ID: <51C8B6EF.5070108@redhat.com> Date: Mon, 24 Jun 2013 23:15:27 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1372101677-46175-1-git-send-email-emaste@freebsd.org> In-Reply-To: <1372101677-46175-1-git-send-email-emaste@freebsd.org> Content-Type: text/plain; charset=ISO-8859-1 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: Ed Maste Cc: qemu-trivial@nongnu.org, qemu-devel@nongnu.org Il 24/06/2013 21:21, Ed Maste ha scritto: > Signed-off-by: Ed Maste > --- > I have had this in a local tree for some time, and it is needed by the > BSD-user work that is now being proposed. At this time, qemu/tls.h is really just for cpu_single_env, so I think this patch should be applied together with the bsd-user patches that need it. > As an aside, an abstraction was recently proposed for Open vSwtich that > can use any of _Thread_local, __thread, or pthread_getspecific() which > may make a convenient reference for someone wishing to implement one of > the TODOs: http://openvswitch.org/pipermail/dev/2013-June/028665.html 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). Paolo