[vlc-devel] [PATCH 3/9] vlc_list: tell which structure.field an intrusive list is using to store links

Steve Lhomme robux4 at ycbcr.xyz
Fri Aug 17 15:04:35 CEST 2018


---
 include/vlc_input_item.h         | 2 +-
 src/input/es_out.c               | 7 ++++---
 src/misc/variables.h             | 2 +-
 src/network/httpd.c              | 6 +++---
 src/playlist/playlist_internal.h | 2 +-
 5 files changed, 10 insertions(+), 9 deletions(-)

diff --git a/include/vlc_input_item.h b/include/vlc_input_item.h
index 655a934195..334e81f3e1 100644
--- a/include/vlc_input_item.h
+++ b/include/vlc_input_item.h
@@ -52,7 +52,7 @@ struct info_t
 struct info_category_t
 {
     char   *psz_name;      /**< Name of this category */
-    struct vlc_list infos; /**< Infos in the category */
+    struct vlc_list infos; /**< Infos in the category, intrusive in info_t.node */
 };
 
 enum input_item_type_e
diff --git a/src/input/es_out.c b/src/input/es_out.c
index 588b9adcdb..7d8b9b666c 100644
--- a/src/input/es_out.c
+++ b/src/input/es_out.c
@@ -137,13 +137,14 @@ typedef struct
     vlc_mutex_t   lock;
 
     /* all programs */
-    struct vlc_list programs;
+    struct vlc_list programs; /* using es_out_pgrm_t.node */
     es_out_pgrm_t *p_pgrm;  /* Master program */
 
     /* all es */
     int         i_id;
-    struct vlc_list es;
-    struct vlc_list es_slaves; /* Dynamically created es on regular es selection */
+    struct vlc_list es;  /* intrusive in es_out_id_t.node */
+    struct vlc_list es_slaves; /* Dynamically created es on regular es selection,
+                                  intrusive in es_out_id_t.node */
 
     /* mode gestion */
     bool  b_active;
diff --git a/src/misc/variables.h b/src/misc/variables.h
index c986906cd1..dbf8dddcd7 100644
--- a/src/misc/variables.h
+++ b/src/misc/variables.h
@@ -50,7 +50,7 @@ struct vlc_object_internals
 
     /* Objects tree structure */
     vlc_list_node   siblings; /**< Siblings list node, from list 'children' */
-    struct vlc_list children; /**< Children list */
+    struct vlc_list children; /**< Children list, intrusive in 'siblings' */
     vlc_mutex_t tree_lock;
 
     /* Object resources */
diff --git a/src/network/httpd.c b/src/network/httpd.c
index 04151b01fb..1eff0dc0bd 100644
--- a/src/network/httpd.c
+++ b/src/network/httpd.c
@@ -94,10 +94,10 @@ struct httpd_host_t
      * This will slow down the url research but make my live easier
      * All url will have their cb trigger, but only the first one can answer
      * */
-    struct vlc_list urls;
+    struct vlc_list urls;  /* intrusive in httpd_url_t.node */
 
     size_t client_count;
-    struct vlc_list clients;
+    struct vlc_list clients;  /* intrusive in httpd_url_t.httpd_client_t */
 
     /* TLS data */
     vlc_tls_creds_t *p_tls;
@@ -901,7 +901,7 @@ httpd_host_t *vlc_rtsp_HostNew(vlc_object_t *p_this)
 static struct httpd
 {
     vlc_mutex_t  mutex;
-    struct vlc_list hosts;
+    struct vlc_list hosts;  /* intrusive in httpd_host_t.node */
 } httpd = { VLC_STATIC_MUTEX, VLC_LIST_INITIALIZER(&httpd.hosts) };
 
 static httpd_host_t *httpd_HostCreate(vlc_object_t *p_this,
diff --git a/src/playlist/playlist_internal.h b/src/playlist/playlist_internal.h
index 3ed57c2a53..48716e6e3a 100644
--- a/src/playlist/playlist_internal.h
+++ b/src/playlist/playlist_internal.h
@@ -50,7 +50,7 @@ typedef struct playlist_private_t
                            to playlist item mapping */
     void *id_tree; /**< Search tree for item ID to item mapping */
 
-    struct vlc_list       sds;
+    struct vlc_list       sds;  /* intrusive in vlc_sd_internal_t.sds_item */
     input_thread_t *      p_input;  /**< the input thread associated
                                      * with the current item */
     input_resource_t *   p_input_resource; /**< input resources */
-- 
2.17.0



More information about the vlc-devel mailing list