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 library we
>> might be compiled against -- consider MacOSX, the BSDs,
>> and occasionally somebody tries to compile against one
>> of the embedded libcs).
>
> Except pthread_setname_np is not portable and was previously
> ifdef'd _GNU_SOURCE anyway

I still think it's a generally worse way to do checks.
We currently have only one check against __GLIBC_MINOR__
in the tree (and that's in extremely Linux-specific
code).

> the parameters on other OSs
> maybe different (freebsd has got a 3rd parameter for no
> apparent reason).

This rather suggests we should abstract the "set thread
name" functionality out into its own function so we
can easily provide other implementations for those
other OSes later.

thanks
-- PMM

Reply via email to