* 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>
\
/* 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; \
* 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>
*
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';
}
* 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>
{
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 )
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 )
{