Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
d25fd8d7
Commit
d25fd8d7
authored
Oct 13, 2010
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Timer: remove the static lock
parent
59fb10d0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
8 deletions
+7
-8
src/misc/pthread.c
src/misc/pthread.c
+7
-8
No files found.
src/misc/pthread.c
View file @
d25fd8d7
...
...
@@ -939,17 +939,17 @@ void vlc_timer_destroy (vlc_timer_t timer)
void
vlc_timer_schedule
(
vlc_timer_t
timer
,
bool
absolute
,
mtime_t
value
,
mtime_t
interval
)
{
static
vlc_mutex_t
lock
=
VLC_STATIC_MUTEX
;
vlc_mutex_lock
(
&
lock
);
vlc_mutex_lock
(
&
timer
->
lock
);
if
(
timer
->
value
)
while
(
timer
->
value
)
{
vlc_thread_t
thread
=
timer
->
thread
;
timer
->
value
=
0
;
vlc_mutex_unlock
(
&
timer
->
lock
);
vlc_cancel
(
timer
->
thread
);
vlc_join
(
timer
->
thread
,
NULL
);
vlc_cancel
(
thread
);
/* cannot keep the lock during vlc_join X( */
vlc_join
(
thread
,
NULL
);
vlc_mutex_lock
(
&
timer
->
lock
);
timer
->
value
=
0
;
}
if
((
value
!=
0
)
&&
(
vlc_clone
(
&
timer
->
thread
,
vlc_timer_thread
,
timer
,
...
...
@@ -959,7 +959,6 @@ void vlc_timer_schedule (vlc_timer_t timer, bool absolute,
timer
->
interval
=
interval
;
}
vlc_mutex_unlock
(
&
timer
->
lock
);
vlc_mutex_unlock
(
&
lock
);
}
/**
...
...
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