Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-gpu
Commits
236a2766
Commit
236a2766
authored
Aug 18, 2011
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Initialize the configuration R/W lock statically
The lock is static anyway (and so is the data).
parent
4707b4f4
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
3 deletions
+4
-3
src/config/core.c
src/config/core.c
+1
-1
src/modules/bank.c
src/modules/bank.c
+0
-2
src/win32/thread.c
src/win32/thread.c
+3
-0
No files found.
src/config/core.c
View file @
236a2766
...
@@ -36,7 +36,7 @@
...
@@ -36,7 +36,7 @@
#include "configuration.h"
#include "configuration.h"
#include "modules/modules.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
)
static
inline
char
*
strdupnull
(
const
char
*
src
)
{
{
...
...
src/modules/bank.c
View file @
236a2766
...
@@ -92,7 +92,6 @@ void module_InitBank (void)
...
@@ -92,7 +92,6 @@ void module_InitBank (void)
if
(
likely
(
module
!=
NULL
))
if
(
likely
(
module
!=
NULL
))
module_StoreBank
(
module
);
module_StoreBank
(
module
);
vlc_rwlock_init
(
&
config_lock
);
config_SortConfig
();
config_SortConfig
();
}
}
modules
.
usage
++
;
modules
.
usage
++
;
...
@@ -126,7 +125,6 @@ void module_EndBank (bool b_plugins)
...
@@ -126,7 +125,6 @@ void module_EndBank (bool b_plugins)
if
(
--
modules
.
usage
==
0
)
if
(
--
modules
.
usage
==
0
)
{
{
config_UnsortConfig
();
config_UnsortConfig
();
vlc_rwlock_destroy
(
&
config_lock
);
head
=
modules
.
head
;
head
=
modules
.
head
;
modules
.
head
=
NULL
;
modules
.
head
=
NULL
;
}
}
...
...
src/win32/thread.c
View file @
236a2766
...
@@ -39,6 +39,7 @@
...
@@ -39,6 +39,7 @@
#ifdef UNDER_CE
#ifdef UNDER_CE
# include <mmsystem.h>
# include <mmsystem.h>
#endif
#endif
#include "config/configuration.h"
static
vlc_threadvar_t
thread_key
;
static
vlc_threadvar_t
thread_key
;
...
@@ -79,9 +80,11 @@ BOOL WINAPI DllMain (HINSTANCE hinstDll, DWORD fdwReason, LPVOID lpvReserved)
...
@@ -79,9 +80,11 @@ BOOL WINAPI DllMain (HINSTANCE hinstDll, DWORD fdwReason, LPVOID lpvReserved)
return
FALSE
;
return
FALSE
;
InitializeCriticalSection
(
&
super_mutex
);
InitializeCriticalSection
(
&
super_mutex
);
vlc_threadvar_create
(
&
thread_key
,
NULL
);
vlc_threadvar_create
(
&
thread_key
,
NULL
);
vlc_rwlock_init
(
&
config_lock
);
break
;
break
;
case
DLL_PROCESS_DETACH
:
case
DLL_PROCESS_DETACH
:
vlc_rwlock_destroy
(
&
config_lock
);
vlc_threadvar_delete
(
&
thread_key
);
vlc_threadvar_delete
(
&
thread_key
);
DeleteCriticalSection
(
&
super_mutex
);
DeleteCriticalSection
(
&
super_mutex
);
CloseHandle
(
super_cond
);
CloseHandle
(
super_cond
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment