[FFmpeg-devel] [PATCH] lavu: add ff_pthread_setname() and use it in various places
Timothy Gu
timothygu99 at gmail.com
Wed Jan 20 21:48:52 CET 2016
On Wed, Jan 20, 2016 at 09:44:32PM +0100, Clément Bœsch wrote:
> diff --git a/libavutil/thread.h b/libavutil/thread.h
> index 32ddf40..a7b5763 100644
> --- a/libavutil/thread.h
> +++ b/libavutil/thread.h
> @@ -169,4 +169,13 @@ static inline int ff_thread_once(char *control, void (*routine)(void))
>
> #endif
>
> +static inline void ff_pthread_setname(const char *name)
> +{
> +#if defined(__APPLE__)
> + pthread_setname_np(name);
> +#elif defined(__linux__)
You might want to check this in configure since mingw-w64 (and probably other
platforms) supports this as well.
Timothy
More information about the ffmpeg-devel
mailing list