From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46471) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UrDZ0-0001BY-Eb for qemu-devel@nongnu.org; Mon, 24 Jun 2013 16:40:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UrDYz-0002Lz-5i for qemu-devel@nongnu.org; Mon, 24 Jun 2013 16:40:38 -0400 Received: from [216.171.111.232] (port=35530 helo=freebsd.org) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UrCKE-0008GT-Qg for qemu-devel@nongnu.org; Mon, 24 Jun 2013 15:21:18 -0400 From: Ed Maste Date: Mon, 24 Jun 2013 15:21:17 -0400 Message-Id: <1372101677-46175-1-git-send-email-emaste@freebsd.org> Subject: [Qemu-devel] [PATCH] tls.h: Enable TLS on FreeBSD List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: qemu-trivial@nongnu.org, Ed Maste 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. 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 include/qemu/tls.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/qemu/tls.h b/include/qemu/tls.h index b92ea9d..ae7d79d 100644 --- a/include/qemu/tls.h +++ b/include/qemu/tls.h @@ -38,7 +38,7 @@ * TODO: proper implementations via Win32 .tls sections and * POSIX pthread_getspecific. */ -#ifdef __linux__ +#if defined(__linux__) || defined(__FreeBSD__) #define DECLARE_TLS(type, x) extern DEFINE_TLS(type, x) #define DEFINE_TLS(type, x) __thread __typeof__(type) tls__##x #define tls_var(x) tls__##x -- 1.7.11.5