]> git.sesse.net Git - vlc/blobdiff - src/modules/modules.c
Use a global R/W lock for configuration
[vlc] / src / modules / modules.c
index b6592024e6fa9d9e1b926752bb89985eac520d89..8f20a8ebbb9f3b3508709dd47ad507a235cc1620 100644 (file)
@@ -137,6 +137,7 @@ void __module_InitBank( vlc_object_t *p_this )
          * options of main will be available in the module bank structure just
          * as for every other module. */
         AllocateBuiltinModule( p_this, vlc_entry__main );
+        vlc_rwlock_init (&config_lock);
     }
     else
         p_module_bank->i_usage++;
@@ -180,6 +181,7 @@ void module_EndBank( vlc_object_t *p_this, bool b_plugins )
         vlc_mutex_unlock( &module_lock );
         return;
     }
+    vlc_rwlock_destroy (&config_lock);
     p_module_bank = NULL;
     vlc_mutex_unlock( &module_lock );