Commit 5cfee589 authored by Gildas Bazin's avatar Gildas Bazin

* ./include/vlc_common.h: got rid of i_thread in VLC_COMMON_MEMBERS.
parent f8570a69
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
* Collection of useful common types and macros definitions * Collection of useful common types and macros definitions
***************************************************************************** *****************************************************************************
* Copyright (C) 1998, 1999, 2000 VideoLAN * 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> * Authors: Samuel Hocevar <sam@via.ecp.fr>
* Vincent Seguin <seguin@via.ecp.fr> * Vincent Seguin <seguin@via.ecp.fr>
...@@ -220,7 +220,6 @@ VLC_DECLARE_STRUCT(iso639_lang) ...@@ -220,7 +220,6 @@ VLC_DECLARE_STRUCT(iso639_lang)
\ \
/* Thread properties, if any */ \ /* Thread properties, if any */ \
vlc_bool_t b_thread; \ vlc_bool_t b_thread; \
int i_thread; \
vlc_thread_t thread_id; \ vlc_thread_t thread_id; \
vlc_mutex_t thread_lock; \ vlc_mutex_t thread_lock; \
vlc_cond_t thread_wait; \ vlc_cond_t thread_wait; \
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* objects.c: vlc_object_t handling * objects.c: vlc_object_t handling
***************************************************************************** *****************************************************************************
* Copyright (C) 2002 VideoLAN * 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> * Authors: Samuel Hocevar <sam@zoy.org>
* *
...@@ -484,7 +484,7 @@ static void vlc_dumpstructure_inner( vlc_object_t *p_this, ...@@ -484,7 +484,7 @@ static void vlc_dumpstructure_inner( vlc_object_t *p_this,
psz_thread[0] = '\0'; psz_thread[0] = '\0';
if( p_this->b_thread ) 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'; psz_thread[19] = '\0';
} }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* threads.c : threads implementation for the VideoLAN client * threads.c : threads implementation for the VideoLAN client
***************************************************************************** *****************************************************************************
* Copyright (C) 1999, 2000, 2001, 2002 VideoLAN * 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> * Authors: Jean-Marc Dressler <polux@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org> * Samuel Hocevar <sam@zoy.org>
...@@ -404,13 +404,13 @@ int __vlc_thread_create( vlc_object_t *p_this, char * psz_file, int i_line, ...@@ -404,13 +404,13 @@ int __vlc_thread_create( vlc_object_t *p_this, char * psz_file, int i_line,
{ {
unsigned threadID; unsigned threadID;
/* When using the MSVCRT C library you have to use the _beginthreadex /* When using the MSVCRT C library you have to use the _beginthreadex
* function instead of CreateThread, otherwise you'll end up with memory * function instead of CreateThread, otherwise you'll end up with
* leaks and the signal functions not working */ * memory leaks and the signal functions not working */
p_this->thread_id = p_this->thread_id =
(HANDLE)_beginthreadex( NULL, 0, (PTHREAD_START) func, (HANDLE)_beginthreadex( NULL, 0, (PTHREAD_START) func,
(void *)p_this, 0, &threadID ); (void *)p_this, 0, &threadID );
} }
i_ret = ( p_this->thread_id ? 0 : 1 ); i_ret = ( p_this->thread_id ? 0 : 1 );
#elif defined( PTHREAD_COND_T_IN_PTHREAD_H ) #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, ...@@ -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->thread_id, psz_name, psz_file, i_line );
p_this->b_thread = 1; p_this->b_thread = 1;
p_this->i_thread = p_this->thread_id; /* We hope the cast will work */
if( b_wait ) if( b_wait )
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment