[vlc-devel] [PATCH 2/4] objects: rename DumpStructure to DumpStructureLocked

Steve Lhomme robux4 at ycbcr.xyz
Wed Mar 13 09:01:16 CET 2019


and remove the assert on the locked state
---
 src/misc/objects.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/src/misc/objects.c b/src/misc/objects.c
index 481536d258..42adaefa40 100644
--- a/src/misc/objects.c
+++ b/src/misc/objects.c
@@ -117,7 +117,7 @@ static void PrintObject(vlc_object_t *obj, FILE *output)
     vlc_restorecancel (canc);
 }
 
-static void DumpStructure(vlc_object_t *obj, FILE *output, unsigned level)
+static void DumpStructureLocked(vlc_object_t *obj, FILE *output, unsigned level)
 {
     PrintObject(obj, output);
 
@@ -129,9 +129,8 @@ static void DumpStructure(vlc_object_t *obj, FILE *output, unsigned level)
 
     vlc_object_internals_t *priv;
 
-    vlc_mutex_assert(&tree_lock);
     vlc_children_foreach(priv, vlc_internals(obj))
-        DumpStructure(vlc_externals(priv), output, level + 1);
+        DumpStructureLocked(vlc_externals(priv), output, level + 1);
 }
 
 /**
@@ -148,7 +147,7 @@ static int TreeCommand (vlc_object_t *obj, char const *cmd,
 
     flockfile(stdout);
     vlc_mutex_lock(&tree_lock);
-    DumpStructure(obj, stdout, 0);
+    DumpStructureLocked(obj, stdout, 0);
     vlc_mutex_unlock(&tree_lock);
     funlockfile(stdout);
     return VLC_SUCCESS;
-- 
2.17.1



More information about the vlc-devel mailing list