On 11/25/2017 3:07 PM, Clément Bœsch wrote: > On Sat, Nov 25, 2017 at 05:01:56PM +0000, Rostislav Pehlivanov wrote: > [...] >> -volatile int ff_avcodec_locked; >> +static atomic_bool ff_avcodec_locked; >> static atomic_int entangled_thread_counter = ATOMIC_VAR_INIT(0); >> static void *codec_mutex; >> static void *avformat_mutex; >> @@ -1937,6 +1937,7 @@ int av_lockmgr_register(int (*cb)(void **mutex, enum >> AVLockOp op)) >> >> int ff_lock_avcodec(AVCodecContext *log_ctx, const AVCodec *codec) >> { > >> + _Bool exp = 1; > > why _Bool instead of atomic_bool?
See http://en.cppreference.com/w/c/atomic/atomic_compare_exchange The variable passed as argument for *expected needs to be of the non-atomic type of the variable passed for *obj. _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel