[FFmpeg-devel] [PATCH] lavu: add ff_pthread_setname() and use it in various places

Moritz Barsnick barsnick at gmx.net
Sat Jun 24 18:54:50 EEST 2017


On Fri, Jun 23, 2017 at 18:48:04 +0100, Rostislav Pehlivanov wrote:
> with the addition it'll define _GNU_SOURCE in the configure system,

Does setting _GNU_SOURCE have any implications on how other functions
work? Other than making this (and other unused functions) available.

> +  check_func pthread_setname_np && add_cppflags -D_GNU_SOURCE

This might even enable _GNU_SOURCE on e.g. BSD, and then:

> +#if HAVE_PTHREAD_SETNAME_NP
> +#if defined(__APPLE__)
> +    pthread_setname_np(name);
> +#elif defined(__linux__) && defined(__GLIBC__)
> +    pthread_setname_np(pthread_self(), name);
> +#endif
> +#endif

... ultimately not even use this patch's functionality. (Though
_GNU_SOURCE might not harm there, if it's not GNU.)

I'm not saying this is all wrong, it may be quite correct. I'm just
hinting "here (could) be dragons". ;-)

Moritz


More information about the ffmpeg-devel mailing list