From: RĂ©mi Denis-Courmont Date: Sat, 27 Sep 2008 21:06:47 +0000 (+0300) Subject: vlc_assert_locked is private X-Git-Tag: 1.0.0-pre1~2838 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=08b2e6483a33b00fb48511529e81d2c9c367c91a;p=vlc vlc_assert_locked is private --- diff --git a/include/vlc_threads.h b/include/vlc_threads.h index 4a5ea557f4..de383f1d08 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 a5ea4e4be2..ef165fb773 100644 --- a/src/audio_output/common.c +++ b/src/audio_output/common.c @@ -33,6 +33,7 @@ #include #include #include "aout_internal.h" +#include "libvlc.h" /* * Instances management (internal and external) diff --git a/src/libvlc.h b/src/libvlc.h index abc3aabec1..168da41d79 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 */