[vlc-devel] vlc_object_signal removal
Rémi Denis-Courmont
rem at videolan.org
Sun Sep 7 20:22:05 CEST 2008
Hello,
vlc_object_signal() is *broken* (as the author of this crappy function, I
think I know what I am talking about:D). It makes no sense to signal an
object without _then_ changing some of its data/state:
LOCK();
/* change some stuff here... */
SIGNAL();
/* or change some stuff here, all the same */
UNLOCK();
Considering that vlc_object_signal, locks, signals and unlocks without giving
any opportunity for changing any state, it makes no sense. Unsurprisingly,
there are way more users of the proper vlc_object_signal_unlocked() than
vlc_object_signal():
src/interface/interface.c: vlc_object_signal( p_intf->p_libvlc );
src/video_output/vout_intf.c: vlc_object_signal( p_dest );
src/video_output/vout_intf.c: vlc_object_signal( p_dest );
src/video_output/vout_intf.c: vlc_object_signal( p_dest );
src/video_output/vout_intf.c: vlc_object_signal( p_dest );
modules/misc/lua/libs/misc.c: vlc_object_signal( p_this );
Snapshot support (vout_intf.c) is buggy, it fails to include any condition to
loop on the waiting side. LUA very much seems buggy, but I don't know it's
supposed to work. Then there is some obscure MacOS X hack whose logic has
resisted my attempts to make any sense out of it.
--
Rémi Denis-Courmont
http://git.remlab.net/cgi-bin/gitweb.cgi?p=vlc-courmisch.git;a=summary
More information about the vlc-devel
mailing list