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

Rémi Denis-Courmont remi at remlab.net
Mon Jul 2 18:18:25 CEST 2018


Le maanantaina 2. heinäkuuta 2018, 18.53.17 EEST Romain Vimont a écrit :
> On Mon, Jul 02, 2018 at 06:43:19PM +0300, Rémi Denis-Courmont wrote:
> > There was a protection and you removed it. By definition, we can obviously
> > not have more uintptr_max in-memory refs.
> There was no "protection", the type was just wider.

In other words, there was a protection: the type was wide enough.

> But again, it seems
> to me that this choice was arbitrary and inconsistent: there was no good
> reason to use atomic_uintptr_t at some places and atomic_uint at some
> others.
> 
> If there was a good reason, please tell me (this is the purpose of
> reviews), so we just won't use vlc_atomic_rc_t for these 2 specific
> cases.

I cannot answer for the use of atomic_uint. It was either not done by me, and/
or it was mindlessly converted from non-atomic unsigned int.

Picture pool uses short because the count is bound by the number of pictures.

-- 
レミ・デニ-クールモン
http://www.remlab.net/





More information about the vlc-devel mailing list