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

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


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.

Le 2 juillet 2018 18:46:58 GMT+03:00, Romain Vimont <rom1v at videolabs.io> a écrit :
>On Mon, Jul 02, 2018 at 06:32:33PM +0300, Rémi Denis-Courmont wrote:
>> 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.
>
>I'm glad you watched the video linked in the commit message more than 3
>minutes (1), so that you were able to apply what the author explained
>in
>some random file in VLC yesterday (2).
>
>However, I think it would benefit the project more if this was done in
>a helper used many times.
>
>If you prefer to use the second version (with the explicit fence), we
>can just change the implementation of vlc_atomic_rc_dec().
>
>(1)
>https://www.youtube.com/watch?v=M15UKpNlpeM&feature=youtu.be&t=49m10s
>(2)
>https://git.videolan.org/?p=vlc.git;a=commitdiff;h=ae2fed77b4833d522087176048d2586c60f9bd9b
>_______________________________________________
>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é.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20180702/a72b8c5d/attachment.html>


More information about the vlc-devel mailing list