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 36df664..3230ffd 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 73ea005..49b784e 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
  *