[vlc-devel] [vlc-commits] video_output: rename vout_UpdateWindowSize() to vout_UpdateWindowSizeLocked()

Thomas Guillem thomas at gllm.fr
Wed Jun 5 08:44:50 CEST 2019


On Wed, Jun 5, 2019, at 08:37, Steve Lhomme wrote:
> On 2019-06-04 18:05, Rémi Denis-Courmont wrote:
> > Le tiistaina 4. kesäkuuta 2019, 14.47.31 EEST Steve Lhomme a écrit :
> >> vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Tue Jun  4 13:30:10
> >> 2019 +0200| [d6c4424ac0cb9f930ada07f0d2119343ed70275e] | committer: Steve
> >> Lhomme
> >>
> >> video_output: rename vout_UpdateWindowSize() to
> >> vout_UpdateWindowSizeLocked()
> >>
> >> It has to be called locked.
> > 
> > A non-locking function is an unlocked function.
> > Naming seems the complete opposite of convention here.
> 
> A quick look at the code for "Locked(" in the call confirms what I 
> thought. The Locked suffix indicates that the call is done while a mutex 
> is locked. Something is even assert that the mutext is locked.
> 
> A simple example:

Yes, that is what I always did in the past.

> 
> static void EsOutDel( es_out_t *out, es_out_id_t *es )
> {
>      es_out_sys_t *p_sys = container_of(out, es_out_sys_t, out);
>      vlc_mutex_lock( &p_sys->lock );
>      EsOutDelLocked( out, es );
>      vlc_mutex_unlock( &p_sys->lock );
> }
> 
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel


More information about the vlc-devel mailing list