[vlc-devel] commit: Added vlc_object_assert_locked utility. (Laurent Aimar )

git version control git at videolan.org
Mon Jan 5 21:26:42 CET 2009


vlc | branch: master | Laurent Aimar <fenrir at videolan.org> | Mon Dec 22 10:20:41 2008 +0100| [5aa33f1fab766842d59a7dcb7aa462aab9c681cf] | committer: Laurent Aimar 

Added vlc_object_assert_locked utility.

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

 include/vlc_objects.h |    4 ++++
 src/libvlccore.sym    |    1 +
 src/misc/objects.c    |    4 ++++
 3 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/include/vlc_objects.h b/include/vlc_objects.h
index d870d0d..a034a6b 100644
--- a/include/vlc_objects.h
+++ b/include/vlc_objects.h
@@ -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 ) )
diff --git a/src/libvlccore.sym b/src/libvlccore.sym
index 61869c6..7ec2be2 100644
--- a/src/libvlccore.sym
+++ b/src/libvlccore.sym
@@ -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
diff --git a/src/misc/objects.c b/src/misc/objects.c
index 070193d..36aeb76 100644
--- a/src/misc/objects.c
+++ b/src/misc/objects.c
@@ -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>




More information about the vlc-devel mailing list