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 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 > > apparen

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 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 are identical to

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

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 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

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 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 people will st

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 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 w

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 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 19:46, Dr. David Alan Gilbert 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 enable it

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 th

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 wrote: > * Jan Kiszka (jan.kis...@siemens.com) wrote: >> pthread_setname_np was introduced with 2.12. >> >> Signed-off-by: Jan Kiszka > > Reviewed-by: Dr. David Alan Gilbert > > I'll polish a configure/separate function as suggested by Peter; > let'

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 wrote: > > * Peter Maydell (peter.mayd...@linaro.org) wrote: > >> On 11 March 2014 16:13, Dr. David Alan Gilbert wrote: > >> > * Peter Maydell (peter.mayd...@linaro.org) wrote: > >> >>

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 Reviewed-by: Dr. David Alan Gilbert I'll polish a configure/separate function as suggested by Peter; let's get the simple fix in quickly though to unbreak people while I do

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 wrote: > * Peter Maydell (peter.mayd...@linaro.org) wrote: >> On 11 March 2014 16:13, Dr. David Alan Gilbert wrote: >> > * Peter Maydell (peter.mayd...@linaro.org) wrote: >> >> Can we have a configure test for the function instead, please? >> >> We d

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 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 > >> (amo

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 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 library we >> might

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 wrote: > > pthread_setname_np was introduced with 2.12. > > > > Signed-off-by: Jan Kiszka > > --- > > util/qemu-thread-posix.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/uti

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 wrote: > pthread_setname_np was introduced with 2.12. > > Signed-off-by: Jan Kiszka > --- > 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..96

[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 --- 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 --- a/util/qemu-thread-posix.c +++ b/util/qemu