[vlc-devel] [PATCH 3/4] queue: add generic queue/FIFO helpers

Thomas Guillem thomas at gllm.fr
Mon Apr 13 13:45:35 CEST 2020


Seems OK, to time to review it in time.

On Sat, Apr 11, 2020, at 21:44, Rémi Denis-Courmont wrote:
> Le lauantaina 11. huhtikuuta 2020, 21.41.05 EEST Rémi Denis-Courmont a écrit :
> > +/**
> > + * Thread-safe queue (a.k.a. FIFO).
> > + */
> > +typedef struct vlc_queue
> > +{
> > +    struct vlc_queue_entry *first;
> > +    struct vlc_queue_entry **lastp;
> > +    vlc_mutex_t lock;
> > +    vlc_cond_t wait;
> > +} vlc_queue_t;
> 
> > +VLC_API void *vlc_queue_Dequeue(vlc_queue_t *, ptrdiff_t offset)
> > +VLC_USED;
> 
> It's also possible to store the offset in vlc_queue_t and pass it only to 
> vlc_queue_Init(). Trade-off between usability and memory use.
> 
> -- 
> Rémi Denis-Courmont
> Hagalund ny stad, Nylands republik
> 
> 
> 
> _______________________________________________
> 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