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

Clément Bœsch u at pkh.me
Wed Jan 20 21:57:42 CET 2016


On Wed, Jan 20, 2016 at 12:48:52PM -0800, Timothy Gu wrote:
> 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.
> 

Checking in configure is pretty annoying as every system seems to define
its own function with different arguments all the time (see _np)

I can't really test other systems, so I'd better have the masochist
developer using windows and mingw to develop to add it himself when
needed.

-- 
Clément B.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20160120/77807cae/attachment.sig>


More information about the ffmpeg-devel mailing list