Re: [Qemu-devel] [PATCH] qemu-thread-posix: Fix build against older glibc version

2014-04-02 Thread Ed Maste
On 11 March 2014 12:13, Dr. David Alan Gilbert dgilb...@redhat.com wrote: Except pthread_setname_np is not portable and was previously ifdef'd _GNU_SOURCE anyway, and the parameters on other OSs maybe different (freebsd has got a 3rd parameter for no apparent reason). No, glibc's arguments

Re: [Qemu-devel] [PATCH] qemu-thread-posix: Fix build against older glibc version

2014-04-02 Thread Dr. David Alan Gilbert
* Ed Maste (ema...@freebsd.org) wrote: On 11 March 2014 12:13, Dr. David Alan Gilbert dgilb...@redhat.com wrote: Except pthread_setname_np is not portable and was previously ifdef'd _GNU_SOURCE anyway, and the parameters on other OSs maybe different (freebsd has got a 3rd parameter for no

[Qemu-devel] [PATCH] qemu-thread-posix: Fix build against older glibc version

2014-03-11 Thread Jan Kiszka
pthread_setname_np was introduced with 2.12. Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- util/qemu-thread-posix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/qemu-thread-posix.c b/util/qemu-thread-posix.c index 45113b4..960d7f5 100644 ---

Re: [Qemu-devel] [PATCH] qemu-thread-posix: Fix build against older glibc version

2014-03-11 Thread Peter Maydell
On 11 March 2014 15:49, Jan Kiszka jan.kis...@siemens.com wrote: pthread_setname_np was introduced with 2.12. Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- util/qemu-thread-posix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/qemu-thread-posix.c

Re: [Qemu-devel] [PATCH] qemu-thread-posix: Fix build against older glibc version

2014-03-11 Thread Dr. David Alan Gilbert
* Peter Maydell (peter.mayd...@linaro.org) wrote: On 11 March 2014 15:49, Jan Kiszka jan.kis...@siemens.com wrote: pthread_setname_np was introduced with 2.12. Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- util/qemu-thread-posix.c | 2 +- 1 file changed, 1 insertion(+), 1

Re: [Qemu-devel] [PATCH] qemu-thread-posix: Fix build against older glibc version

2014-03-11 Thread Peter Maydell
On 11 March 2014 16:13, Dr. David Alan Gilbert dgilb...@redhat.com wrote: * Peter Maydell (peter.mayd...@linaro.org) wrote: Can we have a configure test for the function instead, please? We don't generally do tests for specific glibc versions (among other things, glibc is not the only C

Re: [Qemu-devel] [PATCH] qemu-thread-posix: Fix build against older glibc version

2014-03-11 Thread Dr. David Alan Gilbert
* Peter Maydell (peter.mayd...@linaro.org) wrote: On 11 March 2014 16:13, Dr. David Alan Gilbert dgilb...@redhat.com wrote: * Peter Maydell (peter.mayd...@linaro.org) wrote: Can we have a configure test for the function instead, please? We don't generally do tests for specific glibc

Re: [Qemu-devel] [PATCH] qemu-thread-posix: Fix build against older glibc version

2014-03-11 Thread Peter Maydell
On 11 March 2014 16:36, Dr. David Alan Gilbert dgilb...@redhat.com wrote: * Peter Maydell (peter.mayd...@linaro.org) wrote: On 11 March 2014 16:13, Dr. David Alan Gilbert dgilb...@redhat.com wrote: * Peter Maydell (peter.mayd...@linaro.org) wrote: Can we have a configure test for the

Re: [Qemu-devel] [PATCH] qemu-thread-posix: Fix build against older glibc version

2014-03-11 Thread Dr. David Alan Gilbert
* Jan Kiszka (jan.kis...@siemens.com) wrote: pthread_setname_np was introduced with 2.12. Signed-off-by: Jan Kiszka jan.kis...@siemens.com Reviewed-by: Dr. David Alan Gilbert dgilb...@redhat.com I'll polish a configure/separate function as suggested by Peter; let's get the simple fix in

Re: [Qemu-devel] [PATCH] qemu-thread-posix: Fix build against older glibc version

2014-03-11 Thread Michael S. Tsirkin
On Tue, Mar 11, 2014 at 05:51:16PM +, Peter Maydell wrote: On 11 March 2014 16:36, Dr. David Alan Gilbert dgilb...@redhat.com wrote: * Peter Maydell (peter.mayd...@linaro.org) wrote: On 11 March 2014 16:13, Dr. David Alan Gilbert dgilb...@redhat.com wrote: * Peter Maydell

Re: [Qemu-devel] [PATCH] qemu-thread-posix: Fix build against older glibc version

2014-03-11 Thread Peter Maydell
On 11 March 2014 18:08, Dr. David Alan Gilbert dgilb...@redhat.com wrote: * Jan Kiszka (jan.kis...@siemens.com) wrote: pthread_setname_np was introduced with 2.12. Signed-off-by: Jan Kiszka jan.kis...@siemens.com Reviewed-by: Dr. David Alan Gilbert dgilb...@redhat.com I'll polish a

Re: [Qemu-devel] [PATCH] qemu-thread-posix: Fix build against older glibc version

2014-03-11 Thread Dr. David Alan Gilbert
* Michael S. Tsirkin (m...@redhat.com) wrote: Shouldn't we prevent the unsupported option from appearing in qemu output though? Otherwise how does user know whether it works? I'll make it spit a warning if you try and enable it on a platform that doesn't have a way of doing it; ifdef all the

Re: [Qemu-devel] [PATCH] qemu-thread-posix: Fix build against older glibc version

2014-03-11 Thread Peter Maydell
On 11 March 2014 19:46, Dr. David Alan Gilbert dgilb...@redhat.com wrote: * Michael S. Tsirkin (m...@redhat.com) wrote: Shouldn't we prevent the unsupported option from appearing in qemu output though? Otherwise how does user know whether it works? I'll make it spit a warning if you try and

Re: [Qemu-devel] [PATCH] qemu-thread-posix: Fix build against older glibc version

2014-03-11 Thread Michael S. Tsirkin
On Tue, Mar 11, 2014 at 07:53:20PM +, Peter Maydell wrote: On 11 March 2014 19:46, Dr. David Alan Gilbert dgilb...@redhat.com wrote: * Michael S. Tsirkin (m...@redhat.com) wrote: Shouldn't we prevent the unsupported option from appearing in qemu output though? Otherwise how does

Re: [Qemu-devel] [PATCH] qemu-thread-posix: Fix build against older glibc version

2014-03-11 Thread Dr. David Alan Gilbert
* Peter Maydell (peter.mayd...@linaro.org) wrote: On 11 March 2014 19:46, Dr. David Alan Gilbert dgilb...@redhat.com wrote: * Michael S. Tsirkin (m...@redhat.com) wrote: Shouldn't we prevent the unsupported option from appearing in qemu output though? Otherwise how does user know

Re: [Qemu-devel] [PATCH] qemu-thread-posix: Fix build against older glibc version

2014-03-11 Thread Peter Maydell
On 11 March 2014 20:03, Michael S. Tsirkin m...@redhat.com wrote: Because we don't want people to start relying on thread naming to manage the threads outside qemu. Then document that it isn't stable; anybody who relies on it deserves what they get. If we put a command line argument on it then

Re: [Qemu-devel] [PATCH] qemu-thread-posix: Fix build against older glibc version

2014-03-11 Thread Michael S. Tsirkin
On Tue, Mar 11, 2014 at 08:27:58PM +, Peter Maydell wrote: On 11 March 2014 20:03, Michael S. Tsirkin m...@redhat.com wrote: Because we don't want people to start relying on thread naming to manage the threads outside qemu. Then document that it isn't stable; anybody who relies on it

Re: [Qemu-devel] [PATCH] qemu-thread-posix: Fix build against older glibc version

2014-03-11 Thread Eric Blake
On 03/11/2014 02:35 PM, Michael S. Tsirkin wrote: If we put a command line argument on it then people will still be able to incorrectly rely on thread naming by using the command line option. Where would you document this? The idea was that debug in name is a hint. Or even name it