Hi,

On Thu, Feb 25, 2016 at 8:26 PM, Wan-Teh Chang <wtc-at-google....@ffmpeg.org
> wrote:

> On Thu, Feb 25, 2016 at 12:00 PM, Ronald S. Bultje <rsbul...@gmail.com>
> wrote:

> If anything, you can use atomic ints instead of regular ints if we don't
>
> already [1].
> >
> [...]
> > [1] https://ffmpeg.org/doxygen/trunk/atomic_8h_source.html
>
> Thanks for the link. avpriv_atomic_int_get and avpriv_atomic_int_set
> perform the load and store with sequential consistency, which requires
> a full memory barrier and is slower than simply relying on the
> existing per-thread mutex. The drawback of my patch is that it uses
> more memory. I think that's the right trade-off, but I would be happy
> to use an atomic int. Please let me know what you prefer.


Is probably OK since it doesn't introduce new lock/unlock pairs, yes. We
typically don't care about a few bytes of memory.

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

Reply via email to