[vlc-devel] [PATCH v2 01/10] core: add atomic refcounter helper

Romain Vimont rom1v at videolabs.io
Mon Jul 2 17:36:34 CEST 2018

On Mon, Jul 02, 2018 at 06:25:57PM +0300, RĂ©mi Denis-Courmont wrote:
> 1) This creates obvious overflow.

There was no protection against refcount overflow before. This helper
does not add a protection against refcount overflow.

It seems to me that usages of atomic_uintptr_t for refcounters were just
an inconsistency, not justified by atomic_uint being not large enough.
And if it were the case, atomic_uintptr_t is not appropriate.

> 2) So this won't work for e.g. picture_t.

Patch 3 use the refcounter for picture_priv_t. What's the problem?

More information about the vlc-devel mailing list