[vlc-devel] commit: Broadcast when the object is killed ( Rémi Denis-Courmont )

git version control git at videolan.org
Sun Sep 7 20:06:24 CEST 2008


vlc | branch: master | Rémi Denis-Courmont <rdenis at simphalempin.com> | Sun Sep  7 21:08:15 2008 +0300| [a137e3fe6a8426f30bb0550a4dfcbb23cc95f1bf] | committer: Rémi Denis-Courmont 

Broadcast when the object is killed

So there are no deadlocks if multiple threads are waiting on the same
object (although that's not a very brilliant idea).

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=a137e3fe6a8426f30bb0550a4dfcbb23cc95f1bf
---

 src/misc/objects.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/misc/objects.c b/src/misc/objects.c
index 272fd4c..7782245 100644
--- a/src/misc/objects.c
+++ b/src/misc/objects.c
@@ -539,7 +539,7 @@ void __vlc_object_kill( vlc_object_t *p_this )
         close_nocancel (fd);
     }
 
-    vlc_object_signal_unlocked( p_this );
+    vlc_cond_broadcast (&priv->wait);
     /* This also serves as a memory barrier toward vlc_object_alive(): */
     vlc_object_unlock( p_this );
 }




More information about the vlc-devel mailing list