[vlc-devel] [PATCH v2 01/10] core: add atomic refcounter helper
remi at remlab.net
Mon Jul 2 19:39:56 CEST 2018
Le maanantaina 2. heinäkuuta 2018, 20.19.01 EEST Rémi Denis-Courmont a écrit :
> Le maanantaina 2. heinäkuuta 2018, 19.55.12 EEST Romain Vimont a écrit :
> > On Mon, Jul 02, 2018 at 06:56:57PM +0300, Rémi Denis-Courmont wrote:
> > > I prefer thread fence over release order but I still don't know any way
> > > to
> > > make a helper without removing asserts, and I don't want to remove
> > > asserts.
> > Either:
> > 0. we remove these refcount asserts (you don't want that);
> *Nobody* wants to remove asserts, AFAIK.
> > 1. we keep assert() in the header (like in other existing headers);
> An assert() in a public header is a bug, unless within a macro (as in
> <vlc_common.h>). Been there done that. I _will_ remove any assert in public
> headers before 4.0 is out because this will break external plugins again
In fact even macros don't really solve the problems, except where the whole
point of the macro is to issue an assert() (e.g. vlc_assert_unreachable()).
More information about the vlc-devel