mirror of
https://code.videolan.org/videolan/vlc
synced 2024-09-08 11:26:59 +02:00
vlc_threads_funcs.h: Don't attempt to track pthread_cond_wait() that takes a long time before returning as we usually idle that way. This removes annoying warning messages.
This commit is contained in:
parent
4d6a0a40d5
commit
9403fcee68
@ -479,32 +479,7 @@ static inline int __vlc_cond_wait( const char * psz_file, int i_line,
|
||||
i_result = 0;
|
||||
|
||||
#elif defined(LIBVLC_USE_PTHREAD)
|
||||
|
||||
# ifdef DEBUG
|
||||
/* In debug mode, timeout */
|
||||
struct timespec timeout = {
|
||||
(mdate() / 1000000) + THREAD_COND_TIMEOUT,
|
||||
0 /* 1Hz precision is sufficient here :-) */
|
||||
};
|
||||
|
||||
i_result = pthread_cond_timedwait( &p_condvar->cond, &p_mutex->mutex,
|
||||
&timeout );
|
||||
|
||||
if( i_result == ETIMEDOUT )
|
||||
{
|
||||
errno = ETIMEDOUT;
|
||||
msg_Dbg( p_condvar->p_this,
|
||||
"thread %li: possible condition deadlock "
|
||||
"at %s:%d (%m)", CAST_PTHREAD_TO_INT(pthread_self()),
|
||||
psz_file, i_line );
|
||||
|
||||
i_result = pthread_cond_wait( &p_condvar->cond, &p_mutex->mutex );
|
||||
}
|
||||
|
||||
# else
|
||||
i_result = pthread_cond_wait( &p_condvar->cond, &p_mutex->mutex );
|
||||
# endif
|
||||
|
||||
if ( i_result )
|
||||
{
|
||||
i_thread = CAST_PTHREAD_TO_INT(pthread_self());
|
||||
|
Loading…
Reference in New Issue
Block a user