[FFmpeg-devel] [PATCH v3 2/3] libavcodec/utils.c: simplify avcodec locking with atomics
Clément Bœsch
u at pkh.me
Sat Nov 25 20:07:02 EET 2017
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?
--
Clément B.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20171125/e890e62e/attachment.sig>
More information about the ffmpeg-devel
mailing list