int (*__vlc_threads_init_inner) (vlc_object_t *);
int (*__vlc_threads_end_inner) (vlc_object_t *);
int (*__vlc_mutex_init_inner) (vlc_object_t *, vlc_mutex_t *);
- int (*__vlc_mutex_destroy_inner) (char *, int, vlc_mutex_t *);
+ int (*__vlc_mutex_destroy_inner) (const char *, int, vlc_mutex_t *);
int (*__vlc_cond_init_inner) (vlc_object_t *, vlc_cond_t *);
- int (*__vlc_cond_destroy_inner) (char *, int, vlc_cond_t *);
- int (*__vlc_thread_create_inner) (vlc_object_t *, char *, int, char *, void * ( * ) ( void * ), int, vlc_bool_t);
- int (*__vlc_thread_set_priority_inner) (vlc_object_t *, char *, int, int);
+ int (*__vlc_cond_destroy_inner) (const char *, int, vlc_cond_t *);
+ int (*__vlc_thread_create_inner) (vlc_object_t *, const char *, int, const char *, void * ( * ) ( void * ), int, vlc_bool_t);
+ int (*__vlc_thread_set_priority_inner) (vlc_object_t *, const char *, int, int);
void (*__vlc_thread_ready_inner) (vlc_object_t *);
- void (*__vlc_thread_join_inner) (vlc_object_t *, char *, int);
+ void (*__vlc_thread_join_inner) (vlc_object_t *, const char *, int);
void (*__vout_CopyPicture_inner) (vlc_object_t *p_this, picture_t *p_dst, picture_t *p_src);
int (*__vout_InitPicture_inner) (vlc_object_t *p_this, picture_t *p_pic, uint32_t i_chroma, int i_width, int i_height, int i_aspect);
int (*__vout_AllocatePicture_inner) (vlc_object_t *p_this, picture_t *p_pic, uint32_t i_chroma, int i_width, int i_height, int i_aspect);
VLC_EXPORT( int, __vlc_threads_init, ( vlc_object_t * ) );
VLC_EXPORT( int, __vlc_threads_end, ( vlc_object_t * ) );
VLC_EXPORT( int, __vlc_mutex_init, ( vlc_object_t *, vlc_mutex_t * ) );
-VLC_EXPORT( int, __vlc_mutex_destroy, ( char *, int, vlc_mutex_t * ) );
+VLC_EXPORT( int, __vlc_mutex_destroy, ( const char *, int, vlc_mutex_t * ) );
VLC_EXPORT( int, __vlc_cond_init, ( vlc_object_t *, vlc_cond_t * ) );
-VLC_EXPORT( int, __vlc_cond_destroy, ( char *, int, vlc_cond_t * ) );
-VLC_EXPORT( int, __vlc_thread_create, ( vlc_object_t *, char *, int, char *, void * ( * ) ( void * ), int, vlc_bool_t ) );
-VLC_EXPORT( int, __vlc_thread_set_priority, ( vlc_object_t *, char *, int, int ) );
+VLC_EXPORT( int, __vlc_cond_destroy, ( const char *, int, vlc_cond_t * ) );
+VLC_EXPORT( int, __vlc_thread_create, ( vlc_object_t *, const char *, int, const char *, void * ( * ) ( void * ), int, vlc_bool_t ) );
+VLC_EXPORT( int, __vlc_thread_set_priority, ( vlc_object_t *, const char *, int, int ) );
VLC_EXPORT( void, __vlc_thread_ready, ( vlc_object_t * ) );
-VLC_EXPORT( void, __vlc_thread_join, ( vlc_object_t *, char *, int ) );
+VLC_EXPORT( void, __vlc_thread_join, ( vlc_object_t *, const char *, int ) );
/*****************************************************************************
#elif defined( HAVE_CTHREADS_H )
#endif
-/*****************************************************************************
- * Global variable for named mutexes
- *****************************************************************************/
-typedef struct vlc_namedmutex_t vlc_namedmutex_t;
-struct vlc_namedmutex_t
-{
- vlc_mutex_t lock;
-
- char *psz_name;
- int i_usage;
- vlc_namedmutex_t *p_next;
-};
-
/*****************************************************************************
* vlc_threads_init: initialize threads system
*****************************************************************************
/*****************************************************************************
* vlc_mutex_destroy: destroy a mutex, inner version
*****************************************************************************/
-int __vlc_mutex_destroy( char * psz_file, int i_line, vlc_mutex_t *p_mutex )
+int __vlc_mutex_destroy( const char * psz_file, int i_line, vlc_mutex_t *p_mutex )
{
int i_result;
/* In case of error : */
/*****************************************************************************
* vlc_cond_destroy: destroy a condition, inner version
*****************************************************************************/
-int __vlc_cond_destroy( char * psz_file, int i_line, vlc_cond_t *p_condvar )
+int __vlc_cond_destroy( const char * psz_file, int i_line, vlc_cond_t *p_condvar )
{
int i_result;
/* In case of error : */
* Note that i_priority is only taken into account on platforms supporting
* userland real-time priority threads.
*****************************************************************************/
-int __vlc_thread_create( vlc_object_t *p_this, char * psz_file, int i_line,
- char *psz_name, void * ( *func ) ( void * ),
+int __vlc_thread_create( vlc_object_t *p_this, const char * psz_file, int i_line,
+ const char *psz_name, void * ( *func ) ( void * ),
int i_priority, vlc_bool_t b_wait )
{
int i_ret;
* vlc_thread_set_priority: set the priority of the current thread when we
* couldn't set it in vlc_thread_create (for instance for the main thread)
*****************************************************************************/
-int __vlc_thread_set_priority( vlc_object_t *p_this, char * psz_file,
+int __vlc_thread_set_priority( vlc_object_t *p_this, const char * psz_file,
int i_line, int i_priority )
{
#if defined( PTH_INIT_IN_PTH_H ) || defined( ST_INIT_IN_ST_H )
/*****************************************************************************
* vlc_thread_join: wait until a thread exits, inner version
*****************************************************************************/
-void __vlc_thread_join( vlc_object_t *p_this, char * psz_file, int i_line )
+void __vlc_thread_join( vlc_object_t *p_this, const char * psz_file, int i_line )
{
int i_ret = 0;