[vlc-devel] commit: vlc_assert_locked is private ( Rémi Denis-Courmont )

git version control git at videolan.org
Sun Sep 28 13:38:28 CEST 2008


vlc | branch: master | Rémi Denis-Courmont <rdenis at simphalempin.com> | Sun Sep 28 00:06:47 2008 +0300| [08b2e6483a33b00fb48511529e81d2c9c367c91a] | committer: Rémi Denis-Courmont 

vlc_assert_locked is private

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=08b2e6483a33b00fb48511529e81d2c9c367c91a
---

 include/vlc_threads.h     |    7 -------
 src/audio_output/common.c |    1 +
 src/libvlc.h              |    7 +++++++
 3 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/include/vlc_threads.h b/include/vlc_threads.h
index 4a5ea55..de383f1 100644
--- a/include/vlc_threads.h
+++ b/include/vlc_threads.h
@@ -172,13 +172,6 @@ enum {
 
 #define vlc_thread_ready vlc_object_signal
 
-#if defined(LIBVLC_USE_PTHREAD)
-#   define vlc_assert_locked( m ) \
-           assert (pthread_mutex_lock (m) == EDEADLK)
-#else
-# define vlc_assert_locked( m ) (void)m
-#endif
-
 /**
  * Save the cancellation state and disable cancellation for the calling thread.
  * This function must be called before entering a piece of code that is not
diff --git a/src/audio_output/common.c b/src/audio_output/common.c
index a5ea4e4..ef165fb 100644
--- a/src/audio_output/common.c
+++ b/src/audio_output/common.c
@@ -33,6 +33,7 @@
 #include <vlc_common.h>
 #include <vlc_aout.h>
 #include "aout_internal.h"
+#include "libvlc.h"
 
 /*
  * Instances management (internal and external)
diff --git a/src/libvlc.h b/src/libvlc.h
index abc3aab..168da41 100644
--- a/src/libvlc.h
+++ b/src/libvlc.h
@@ -54,6 +54,13 @@ void vlc_thread_cancel (vlc_object_t *);
 void vlc_trace (const char *fn, const char *file, unsigned line);
 #define vlc_backtrace() vlc_trace(__func__, __FILE__, __LINE__)
 
+#if defined (LIBVLC_USE_PTHREAD) && !defined (NDEBUG)
+# define vlc_assert_locked( m ) \
+         assert (pthread_mutex_lock (m) == EDEADLK)
+#else
+# define vlc_assert_locked( m ) (void)m
+#endif
+
 /*
  * CPU capabilities
  */




More information about the vlc-devel mailing list