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

Rémi Denis-Courmont remi at remlab.net
Mon Jul 2 17:32:33 CEST 2018


Scratch picture_t, but still read-only objects (e.g. QString backend storage) or read-only accesses don't need release barrier.

Also acquire barrier is not needed when reference count is more than 1-to-0.

Le 2 juillet 2018 18:25:57 GMT+03:00, "Rémi Denis-Courmont" <remi at remlab.net> a écrit :
>1) This creates obvious overflow. Exactly the bug that the inspiring
>kernel code is meant to fix...
>
>2) So this won't work for e.g. picture_t.
>
>3, 4) Inspiring kernel code does address those issues.
>
>And then, no assert in public headers.
>
>Le 2 juillet 2018 18:18:27 GMT+03:00, "Hugo Beauzée-Luyssen"
><hugo at beauzee.fr> a écrit :
>>On Mon, Jul 2, 2018, at 8:12 AM, Rémi Denis-Courmont wrote:
>>> Same problems as before.
>>> -- 
>>> Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez
>>excuser 
>>> ma brièveté.
>>> _______________________________________________
>>> vlc-devel mailing list
>>> To unsubscribe or modify your subscription options:
>>> https://mailman.videolan.org/listinfo/vlc-devel
>>
>>> - type sizes (uint, uintptr...),
>>
>>The serie only affect code that was using uint, except for patch 4
>that
>>was using uintptr, and I believe uint to be a better fit; and patch
>10.
>>I'm fine with dropping patch 10 for now.
>>
>>> - order on decrement - acq_rel is not always needed,
>>
>>I believe it is.
>>
>>> - corner cases where the decrement is known to not reach zero,
>>
>>Then don't use the helper in that case?
>>
>>> - corner cases where the decrement cannot be permitted to reach
>>zero(e.g. vlc_object_t, IIRC).
>>
>>Ditto.
>>
>>-- 
>>  Hugo Beauzée-Luyssen
>>  hugo at beauzee.fr
>>_______________________________________________
>>vlc-devel mailing list
>>To unsubscribe or modify your subscription options:
>>https://mailman.videolan.org/listinfo/vlc-devel
>
>-- 
>Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez excuser
>ma brièveté.

-- 
Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez excuser ma brièveté.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20180702/7b55b62b/attachment-0001.html>


More information about the vlc-devel mailing list