]> git.sesse.net Git - vlc/commitdiff
Added vlc_object_assert_locked utility.
authorLaurent Aimar <fenrir@videolan.org>
Mon, 22 Dec 2008 09:20:41 +0000 (10:20 +0100)
committerLaurent Aimar <fenrir@videolan.org>
Mon, 5 Jan 2009 19:49:05 +0000 (20:49 +0100)
include/vlc_objects.h
src/libvlccore.sym
src/misc/objects.c

index d870d0df011f5eefce006b5989aac340b367d32b..a034a6b654611ac756a25abdfb7a5c4a9229c47f 100644 (file)
@@ -127,6 +127,10 @@ VLC_EXPORT( void, __vlc_object_unlock, ( vlc_object_t * ) );
 #define vlc_object_unlock( obj ) \
     __vlc_object_unlock( VLC_OBJECT( obj ) )
 
+VLC_EXPORT( void, __vlc_object_assert_locked, ( vlc_object_t * ) );
+#define vlc_object_assert_locked( obj ) \
+    __vlc_object_assert_locked( VLC_OBJECT( obj ) )
+
 VLC_EXPORT( void, __vlc_object_wait, ( vlc_object_t * ) );
 #define vlc_object_wait( obj ) \
     __vlc_object_wait( VLC_OBJECT( obj ) )
index 61869c6cc1760db191f53323102da45ce7c5cb45..7ec2be26b42e96965f4d2babc6bc3f63803c3f6f 100644 (file)
@@ -481,6 +481,7 @@ vlc_mutex_init
 vlc_mutex_init_recursive
 vlc_mutex_lock
 vlc_mutex_unlock
+__vlc_object_assert_locked
 __vlc_object_attach
 __vlc_object_create
 __vlc_object_detach
index 070193dd4072f9422c24a89306c7b15d74dbabdf..36aeb7631edf753bff37127b9ca2dfb6234d8190 100644 (file)
@@ -331,6 +331,10 @@ void __vlc_object_unlock( vlc_object_t *obj )
     vlc_assert_locked( &(vlc_internals(obj)->lock) );
     vlc_mutex_unlock( &(vlc_internals(obj)->lock) );
 }
+void __vlc_object_assert_locked( vlc_object_t *obj )
+{
+    vlc_assert_locked( &(vlc_internals(obj)->lock) );
+}
 
 #ifdef WIN32
 # include <winsock2.h>