]> git.sesse.net Git - vlc/commitdiff
Less aggressive debug message.
authorChristophe Massiot <massiot@videolan.org>
Wed, 22 Jan 2003 15:16:02 +0000 (15:16 +0000)
committerChristophe Massiot <massiot@videolan.org>
Wed, 22 Jan 2003 15:16:02 +0000 (15:16 +0000)
include/vlc_config.h
include/vlc_threads_funcs.h

index 11ef129caafeec3fc4de5b6da6c8783d4f7e566a..91278bb58e2384db0f7fc724d0a30df3112e78aa 100644 (file)
@@ -45,7 +45,7 @@
 
 /* When a thread waits on a condition in debug mode, delay to wait before
  * outputting an error message (in second) */
-#define THREAD_COND_TIMEOUT             15
+#define THREAD_COND_TIMEOUT             1
 
 /* The configuration file and directory */
 #ifdef SYS_BEOS
index ebfb43e15c8236428e08954db133a7fa20c95ef9..ddc9037679af2a6a5d3e2a6533693a177ce49a1c 100644 (file)
@@ -3,7 +3,7 @@
  * This header provides a portable threads implementation.
  *****************************************************************************
  * Copyright (C) 1999, 2002 VideoLAN
- * $Id: vlc_threads_funcs.h,v 1.12 2003/01/16 09:02:46 sam Exp $
+ * $Id: vlc_threads_funcs.h,v 1.13 2003/01/22 15:16:02 massiot Exp $
  *
  * Authors: Jean-Marc Dressler <polux@via.ecp.fr>
  *          Samuel Hocevar <sam@via.ecp.fr>
@@ -605,24 +605,24 @@ static inline int __vlc_cond_wait( char * psz_file, int i_line,
     struct timeval now;
     struct timespec timeout;
 
-    for( ; ; )
-    {
-        gettimeofday( &now, NULL );
-        timeout.tv_sec = now.tv_sec + THREAD_COND_TIMEOUT;
-        timeout.tv_nsec = now.tv_usec * 1000;
+    gettimeofday( &now, NULL );
+    timeout.tv_sec = now.tv_sec + THREAD_COND_TIMEOUT;
+    timeout.tv_nsec = now.tv_usec * 1000;
 
-        i_result = pthread_cond_timedwait( &p_condvar->cond, &p_mutex->mutex,
-                                           &timeout );
+    i_result = pthread_cond_timedwait( &p_condvar->cond, &p_mutex->mutex,
+                                       &timeout );
 
-        if( i_result == ETIMEDOUT )
-        {
-            msg_Warn( p_condvar->p_this,
-                      "thread %d: possible deadlock detected "
-                      "in cond_wait at %s:%d (%s)", (int)pthread_self(),
-                      psz_file, i_line, strerror(i_result) );
-        }
-        else break;
+    if( i_result == ETIMEDOUT )
+    {
+        /* People keep pissing me off with this. --Meuuh */
+        msg_Dbg( p_condvar->p_this,
+                  "thread %d: secret message triggered "
+                  "at %s:%d (%s)", (int)pthread_self(),
+                  psz_file, i_line, strerror(i_result) );
+
+        i_result = pthread_cond_wait( &p_condvar->cond, &p_mutex->mutex );
     }
+
 #   else
     i_result = pthread_cond_wait( &p_condvar->cond, &p_mutex->mutex );
 #   endif