On Sun, Jan 24, 2016 at 01:58:29PM +0100, Clément Bœsch wrote:
> On Wed, Jan 20, 2016 at 09:15:15PM -0300, James Almer wrote:
> > On 1/20/2016 7:46 PM, Clément Bœsch wrote:
> > > diff --git a/libavutil/thread.h b/libavutil/thread.h
> > > index 32ddf40..42430fb 100644
> > > --- a/libavutil/thread.h
> > > +++ b/libavutil/thread.h
> > > @@ -31,6 +31,15 @@
> > >  #if HAVE_PTHREADS
> > >  #include <pthread.h>
> > >  
> > > +static inline void ff_thread_setname(const char *name)
> > > +{
> > > +#if defined(__APPLE__)
> > > +    pthread_setname_np(name);
> > > +#elif defined(__linux__) && defined(__GLIBC__)
> > > +    pthread_setname_np(pthread_self(), name);
> > > +#endif
> > > +}
> > > +
> > >  #if defined(ASSERT_LEVEL) && ASSERT_LEVEL > 1
> > >  
> > >  #include "log.h"
> > > @@ -143,6 +152,7 @@ static inline int strict_pthread_once(pthread_once_t 
> > > *once_control, void (*init_
> > >  #define AV_ONCE_INIT PTHREAD_ONCE_INIT
> > >  
> > >  #define ff_thread_once(control, routine) pthread_once(control, routine)
> > > +#define ff_thread_setname(name) (0)
> > 
> > This is also being applied to pthreads.
> 
> Damn, it's not a good excuse but I was tired and in a hurry that day.
> Thanks for your patience, new patch attached.
> 
> -- 
> Clément B.

>  libavcodec/frame_thread_encoder.c |    2 ++
>  libavcodec/pthread_frame.c        |    2 ++
>  libavcodec/pthread_slice.c        |    2 ++
>  libavfilter/pthread.c             |    2 ++
>  libavformat/async.c               |    2 ++
>  libavformat/udp.c                 |    3 +++
>  libavutil/thread.h                |   13 +++++++++++++

fails to build:
make distclean ; ../configure  --enable-pthreads  --arch=x86_32 
--target-os=linux --extra-cflags=-m32 --extra-ldflags=-m32  
--enable-cross-compile && make -j12
In file included from libavfilter/pthread.c:30:0:
ffmpeg/libavutil/thread.h: In function ‘ff_thread_setname’:
ffmpeg/libavutil/thread.h:134:5: error: implicit declaration of function 
‘pthread_setname_np’ [-Werror=implicit-function-declaration]

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Concerning the gods, I have no means of knowing whether they exist or not
or of what sort they may be, because of the obscurity of the subject, and
the brevity of human life -- Protagoras

Attachment: signature.asc
Description: Digital signature

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel

Reply via email to