Re: [Qemu-devel] [PATCH] tls.h: Enable TLS on FreeBSD

2013-06-25 Thread Paolo Bonzini
Il 24/06/2013 23:30, Peter Maydell ha scritto: On 24 June 2013 22:15, Paolo Bonzini pbonz...@redhat.com wrote: Il 24/06/2013 21:21, Ed Maste ha scritto: Signed-off-by: Ed Maste ema...@freebsd.org --- I have had this in a local tree for some time, and it is needed by the BSD-user work that is

Re: [Qemu-devel] [PATCH] tls.h: Enable TLS on FreeBSD

2013-06-25 Thread Peter Maydell
On 24 June 2013 22:15, Paolo Bonzini pbonz...@redhat.com 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

Re: [Qemu-devel] [PATCH] tls.h: Enable TLS on FreeBSD

2013-06-25 Thread Paolo Bonzini
Il 25/06/2013 12:56, Peter Maydell ha scritto: On 24 June 2013 22:15, Paolo Bonzini pbonz...@redhat.com 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

[Qemu-devel] [PATCH] tls.h: Enable TLS on FreeBSD

2013-06-24 Thread Ed Maste
Signed-off-by: Ed Maste ema...@freebsd.org --- 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()

Re: [Qemu-devel] [PATCH] tls.h: Enable TLS on FreeBSD

2013-06-24 Thread Paolo Bonzini
Il 24/06/2013 21:21, Ed Maste ha scritto: Signed-off-by: Ed Maste ema...@freebsd.org --- 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

Re: [Qemu-devel] [PATCH] tls.h: Enable TLS on FreeBSD

2013-06-24 Thread Peter Maydell
On 24 June 2013 22:15, Paolo Bonzini pbonz...@redhat.com wrote: Il 24/06/2013 21:21, Ed Maste ha scritto: Signed-off-by: Ed Maste ema...@freebsd.org --- 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