]> git.sesse.net Git - vlc/commitdiff
* ./include/vlc_common.h: got rid of i_thread in VLC_COMMON_MEMBERS.
authorGildas Bazin <gbazin@videolan.org>
Sun, 2 Jun 2002 15:51:30 +0000 (15:51 +0000)
committerGildas Bazin <gbazin@videolan.org>
Sun, 2 Jun 2002 15:51:30 +0000 (15:51 +0000)
include/vlc_common.h
src/misc/objects.c
src/misc/threads.c

index 5b93d09d02e0454419ad77c1e011a7d144ba2e91..7b46d8654bef76477c94dfc0019ecdae7a8704ac 100644 (file)
@@ -3,7 +3,7 @@
  * Collection of useful common types and macros definitions
  *****************************************************************************
  * Copyright (C) 1998, 1999, 2000 VideoLAN
- * $Id: vlc_common.h,v 1.4 2002/06/02 13:38:03 gbazin Exp $
+ * $Id: vlc_common.h,v 1.5 2002/06/02 15:51:30 gbazin Exp $
  *
  * Authors: Samuel Hocevar <sam@via.ecp.fr>
  *          Vincent Seguin <seguin@via.ecp.fr>
@@ -220,7 +220,6 @@ VLC_DECLARE_STRUCT(iso639_lang)
                                                                             \
     /* Thread properties, if any */                                         \
     vlc_bool_t   b_thread;                                                  \
-    int          i_thread;                                                  \
     vlc_thread_t thread_id;                                                 \
     vlc_mutex_t  thread_lock;                                               \
     vlc_cond_t   thread_wait;                                               \
index 9dff1d9405e842c10a30d8fdaf3ad510e1dbb8e7..c57cacd31e427d0a7d31a846b6436bb53fdd7f7b 100644 (file)
@@ -2,7 +2,7 @@
  * objects.c: vlc_object_t handling
  *****************************************************************************
  * Copyright (C) 2002 VideoLAN
- * $Id: objects.c,v 1.4 2002/06/02 09:03:54 sam Exp $
+ * $Id: objects.c,v 1.5 2002/06/02 15:51:30 gbazin Exp $
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
  *
@@ -484,7 +484,7 @@ static void vlc_dumpstructure_inner( vlc_object_t *p_this,
     psz_thread[0] = '\0';
     if( p_this->b_thread )
     {
-        snprintf( psz_thread, 20, " (thread %d)", p_this->i_thread );
+        snprintf( psz_thread, 20, " (thread %d)", (int)p_this->thread_id );
         psz_thread[19] = '\0';
     }
 
index 3500b05f89294d54d329564b89d82bfa48f9ceb3..08cd1af9a5d80ab7fe858a7d69b25245d542cd04 100644 (file)
@@ -2,7 +2,7 @@
  * threads.c : threads implementation for the VideoLAN client
  *****************************************************************************
  * Copyright (C) 1999, 2000, 2001, 2002 VideoLAN
- * $Id: threads.c,v 1.4 2002/06/01 18:04:49 sam Exp $
+ * $Id: threads.c,v 1.5 2002/06/02 15:51:30 gbazin Exp $
  *
  * Authors: Jean-Marc Dressler <polux@via.ecp.fr>
  *          Samuel Hocevar <sam@zoy.org>
@@ -404,13 +404,13 @@ int __vlc_thread_create( vlc_object_t *p_this, char * psz_file, int i_line,
     {
         unsigned threadID;
         /* When using the MSVCRT C library you have to use the _beginthreadex
-         * function instead of CreateThread, otherwise you'll end up with memory
-         * leaks and the signal functions not working */
+         * function instead of CreateThread, otherwise you'll end up with
+        * memory leaks and the signal functions not working */
         p_this->thread_id =
                 (HANDLE)_beginthreadex( NULL, 0, (PTHREAD_START) func, 
                                         (void *)p_this, 0, &threadID );
     }
-    
+
     i_ret = ( p_this->thread_id ? 0 : 1 );
 
 #elif defined( PTHREAD_COND_T_IN_PTHREAD_H )
@@ -444,7 +444,6 @@ int __vlc_thread_create( vlc_object_t *p_this, char * psz_file, int i_line,
                          p_this->thread_id, psz_name, psz_file, i_line );
 
         p_this->b_thread = 1;
-        p_this->i_thread = p_this->thread_id;   /* We hope the cast will work */
 
         if( b_wait )
         {