]> git.sesse.net Git - vlc/commitdiff
vlc_object_die() opaque wrapper to set b_die, so we can use another
authorRémi Denis-Courmont <rem@videolan.org>
Thu, 15 Feb 2007 16:33:47 +0000 (16:33 +0000)
committerRémi Denis-Courmont <rem@videolan.org>
Thu, 15 Feb 2007 16:33:47 +0000 (16:33 +0000)
notification mechanism later on.
They are a lot of places that would need to be changed though.

include/vlc_objects.h
src/misc/objects.c

index 36df664f8a5c9a596735a34a3dcee25ef626bda9..3230ffd7fb5422441b2b6c126884be78636f8f01 100644 (file)
@@ -96,6 +96,7 @@ struct vlc_object_t
  *****************************************************************************/
 VLC_EXPORT( void *, __vlc_object_create, ( vlc_object_t *, int ) );
 VLC_EXPORT( void, __vlc_object_destroy, ( vlc_object_t * ) );
+VLC_EXPORT( void, __vlc_object_die, ( vlc_object_t * ) );
 VLC_EXPORT( void, __vlc_object_attach, ( vlc_object_t *, vlc_object_t * ) );
 VLC_EXPORT( void, __vlc_object_detach, ( vlc_object_t * ) );
 VLC_EXPORT( void *, __vlc_object_get, ( vlc_object_t *, int ) );
index 73ea005e13e5d437c2239652fcd422472c9cde27..49b784e1d679baba78e7847814c21dbe691c6f70 100644 (file)
@@ -435,6 +435,15 @@ void __vlc_object_destroy( vlc_object_t *p_this )
     }
 }
 
+
+void __vlc_object_die( vlc_object_t *p_this )
+{
+    vlc_mutex_lock( &p_this->object_lock );
+    p_this->b_die = VLC_TRUE;
+    vlc_mutex_unlock( &p_this->object_lock );
+}
+
+
 /**
  * find an object given its ID
  *