The lock is static anyway (and so is the data).
#include "configuration.h"
#include "modules/modules.h"
-vlc_rwlock_t config_lock;
+vlc_rwlock_t config_lock = VLC_STATIC_RWLOCK;
static inline char *strdupnull (const char *src)
{
if (likely(module != NULL))
module_StoreBank (module);
- vlc_rwlock_init (&config_lock);
config_SortConfig ();
}
modules.usage++;
if (--modules.usage == 0)
{
config_UnsortConfig ();
- vlc_rwlock_destroy (&config_lock);
head = modules.head;
modules.head = NULL;
}
#ifdef UNDER_CE
# include <mmsystem.h>
#endif
+#include "config/configuration.h"
static vlc_threadvar_t thread_key;
return FALSE;
InitializeCriticalSection (&super_mutex);
vlc_threadvar_create (&thread_key, NULL);
+ vlc_rwlock_init (&config_lock);
break;
case DLL_PROCESS_DETACH:
+ vlc_rwlock_destroy (&config_lock);
vlc_threadvar_delete (&thread_key);
DeleteCriticalSection (&super_mutex);
CloseHandle (super_cond);