[vlc-devel] [PATCH] coreaudio: fix deadlock on interruption

Rémi Denis-Courmont remi at remlab.net
Tue Dec 12 20:08:43 CET 2017

Le tiistaina 12. joulukuuta 2017, 18.16.50 EET Thomas Guillem a écrit :
> Maybe, that's easy to say since almost all old atomic algorithms are
> busted.
> We could get ride of it and use mutexes for VLC 4.0 and don't care about
> the wait-less comments (and since mutexes are hybrid now...).

Using for a mutex for a circular buffer only makes sense if you wait (for data 
and/or space), i.e. if you have a condition variable as well. Otherwise, 
atomic variables are actually a smart pick.

The specific implementation here is however flawed for reasons that have 
already been discussed at length in the past:


More information about the vlc-devel mailing list