src: remove vlc_object_alive()

This commit is contained in:
Rémi Denis-Courmont 2015-06-30 23:52:51 +03:00
parent 62d9e9b218
commit 1f67a0dde5
6 changed files with 0 additions and 45 deletions

View File

@ -67,8 +67,4 @@ VLC_API char *vlc_object_get_name( const vlc_object_t * ) VLC_USED;
#define vlc_list_children(a) \
vlc_list_children( VLC_OBJECT(a) )
/* Objects and threading */
VLC_API VLC_USED VLC_DEPRECATED bool vlc_object_alive (vlc_object_t *);
#define vlc_object_alive(a) vlc_object_alive( VLC_OBJECT(a) )
/** @} */

View File

@ -219,10 +219,6 @@ int input_Start( input_thread_t *p_input )
*/
void input_Stop( input_thread_t *p_input )
{
/* Set die for input and ALL of this childrens (even (grand-)grand-childrens)
*/
ObjectKillChildrens( VLC_OBJECT(p_input) );
input_thread_private_t *sys = p_input->p;
vlc_mutex_lock( &sys->lock_control );

View File

@ -57,8 +57,6 @@ void vlc_CPU_dump(vlc_object_t *);
/* This cannot be used as is from plugins yet: */
int vlc_clone_detach (vlc_thread_t *, void *(*)(void *), void *, int);
void ObjectKillChildrens (vlc_object_t *);
int vlc_set_priority( vlc_thread_t, int );
void vlc_threads_setup (libvlc_int_t *);

View File

@ -584,7 +584,6 @@ vlc_object_find_name
vlc_object_hold
vlc_object_release
vlc_object_get_name
vlc_object_alive
vlc_rand_bytes
vlc_drand48
vlc_lrand48

View File

@ -128,7 +128,6 @@ void *vlc_custom_create (vlc_object_t *parent, size_t length,
/* Attach the parent to its child (structure lock needed) */
libvlc_lock (obj->p_libvlc);
atomic_init (&priv->alive, atomic_load (&papriv->alive));
priv->next = papriv->first;
if (priv->next != NULL)
priv->next->prev = priv;
@ -142,7 +141,6 @@ void *vlc_custom_create (vlc_object_t *parent, size_t length,
obj->i_flags = 0;
obj->p_libvlc = self;
obj->p_parent = NULL;
atomic_init (&priv->alive, true);
priv->next = NULL;
vlc_mutex_init (&(libvlc_priv (self)->structure_lock));
@ -256,24 +254,6 @@ static void vlc_object_destroy( vlc_object_t *p_this )
}
/**
* Hack for input objects. Should be removed eventually.
*/
void ObjectKillChildrens( vlc_object_t *p_obj )
{
/* FIXME ObjectKillChildrens seems a very bad idea in fact */
/*if( p_obj == VLC_OBJECT(p_input->p->p_sout) ) return;*/
vlc_object_internals_t *priv = vlc_internals (p_obj);
atomic_store(&priv->alive, false);
vlc_list_t *p_list = vlc_list_children( p_obj );
for( int i = 0; i < p_list->i_count; i++ )
ObjectKillChildrens( p_list->p_values[i].p_address );
vlc_list_release( p_list );
}
#undef vlc_object_find_name
/**
* Finds a named object and increment its reference count.
@ -396,17 +376,6 @@ void vlc_object_release( vlc_object_t *p_this )
}
}
#undef vlc_object_alive
/**
* This function returns true, except when it returns false.
* \warning Do not use this function. Ever. You were warned.
*/
bool vlc_object_alive(vlc_object_t *obj)
{
vlc_object_internals_t *internals = vlc_internals (obj);
return atomic_load (&internals->alive);
}
#undef vlc_list_children
/**
* Gets the list of children of an object, and increment their reference

View File

@ -39,9 +39,6 @@ struct vlc_object_internals
vlc_mutex_t var_lock;
vlc_cond_t var_wait;
/* Objects thread synchronization */
atomic_bool alive;
/* Objects management */
atomic_uint refs;
vlc_destructor_t pf_destructor;