]> git.sesse.net Git - vlc/commitdiff
- Remove useless global variable
authorRémi Denis-Courmont <rem@videolan.org>
Sat, 21 Oct 2006 20:43:06 +0000 (20:43 +0000)
committerRémi Denis-Courmont <rem@videolan.org>
Sat, 21 Oct 2006 20:43:06 +0000 (20:43 +0000)
- Fix threading qualifier warnings

include/vlc_symbols.h
include/vlc_threads_funcs.h
src/misc/threads.c

index 376ad0fcc6469923cc7f6f025db88af95e73477b..06f0b04a04c97c153c72f418d66531ad183e973f 100644 (file)
@@ -334,13 +334,13 @@ struct module_symbols_t
     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);
index ea83856f0f39f6af70be863fa18a592ce1315fd8..ad28a8ea90e17643f6c4cf0a2030277d4d67adf8 100644 (file)
 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 ) );
 
 
 /*****************************************************************************
index b372e748f7f517bb184a9a3ddf7f38f301dad601..ccc263c8a4e9e2380e13f922144f34d7941fad49 100644 (file)
@@ -49,19 +49,6 @@ static vlc_object_t *p_root;
 #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
  *****************************************************************************
@@ -304,7 +291,7 @@ int __vlc_mutex_init( vlc_object_t *p_this, vlc_mutex_t *p_mutex )
 /*****************************************************************************
  * 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 : */
@@ -461,7 +448,7 @@ int __vlc_cond_init( vlc_object_t *p_this, vlc_cond_t *p_condvar )
 /*****************************************************************************
  * 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 : */
@@ -519,8 +506,8 @@ int __vlc_cond_destroy( char * psz_file, int i_line, vlc_cond_t *p_condvar )
  * 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;
@@ -645,7 +632,7 @@ int __vlc_thread_create( vlc_object_t *p_this, char * psz_file, int i_line,
  * 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 )
@@ -707,7 +694,7 @@ void __vlc_thread_ready( vlc_object_t *p_this )
 /*****************************************************************************
  * 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;