[vlc-devel] [PATCH] test: add thread test

Alexandre Janniaux ajanni at videolabs.io
Sat Mar 21 11:17:25 CET 2020


On Sat, Mar 21, 2020 at 08:32:13AM +0200, Rémi Denis-Courmont wrote:
> Le perjantaina 20. maaliskuuta 2020, 22.32.32 EET Romain Vimont a écrit :
> > On 3/20/20 8:53 PM, Rémi Denis-Courmont wrote:
> > > Le perjantaina 20. maaliskuuta 2020, 20.28.21 EET Romain Vimont a écrit :
> > >> A thread calling cond_signal() may not "signal itself" since it's not
> > >> cond_wait()ing. :/
> > >
> > > Sure it can. That's the whole point.
> >
> > For pthread at least, it seems it cannot:
> > https://linux.die.net/man/3/pthread_cond_signal
>
> Sure it can. At some versions of glibc even do it.

This seems weird because glibc is making similar usage of
condition variable in its tests, since 2003, first in NTPL/
and then in sysdeps/pthread.

Anyway, if this shall be the new behaviour of vlc threading
primitives, the documentation of vlc_cond_signal must be
updated.

Regards,
--
Alexandre Janniaux
Videolabs


More information about the vlc-devel mailing list